yukit-web 0.10.7 → 0.10.9
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 +228 -77
- 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 +42 -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
|
@@ -4681,6 +4681,11 @@ export type YuwTooltipPositionDto = 'top' | 'bottom' | 'left' | 'right';
|
|
|
4681
4681
|
* `mutableTooltipDisabled`, which Brain checks once the show delay elapses; blur and hover give the
|
|
4682
4682
|
* `tooltipDisabled` input back.
|
|
4683
4683
|
*
|
|
4684
|
+
* The tooltip opens in the browser's top layer, above everything, toasts included. Apps turn that off for every CDK
|
|
4685
|
+
* overlay (`provideSpartanHlm`, `usePopover: false`) so sheets and dialogs stay below the toaster; this directive turns
|
|
4686
|
+
* it back on for its own overlay only. Brain asks `Overlay` for it, and the root `Overlay` would read the root config,
|
|
4687
|
+
* so the directive provides its own `Overlay` beside the config.
|
|
4688
|
+
*
|
|
4684
4689
|
* Usage:
|
|
4685
4690
|
* ```html
|
|
4686
4691
|
* <button yuwTooltip="Save changes" hlmBtn>Save</button>
|
|
@@ -4784,7 +4789,8 @@ export type YuwToasterPositionDto = 'top-left' | 'top-center' | 'top-right' | 'b
|
|
|
4784
4789
|
export type YuwToasterThemeDto = 'light' | 'dark' | 'system';
|
|
4785
4790
|
/**
|
|
4786
4791
|
* Global toast host. Mount once near the application root; individual toasts are dispatched
|
|
4787
|
-
* through the `toast` API from `@spartan-ng/brain/sonner`.
|
|
4792
|
+
* through the `toast` API from `@spartan-ng/brain/sonner`. Toasts cannot be swiped away (`YuwNoToastSwipeDirective`);
|
|
4793
|
+
* they close with the close button, their own buttons or their timer.
|
|
4788
4794
|
*
|
|
4789
4795
|
* Inputs:
|
|
4790
4796
|
* - `richColors`: Enables per-type colored toasts (success, error, warning, info). Enabled by
|
|
@@ -4864,8 +4870,9 @@ export declare class YuwToasterComponent {
|
|
|
4864
4870
|
/**
|
|
4865
4871
|
* What `yuwCountdownToast` shows and calls. Every text comes translated from the consuming app. `color` paints the bar
|
|
4866
4872
|
* 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
|
-
*
|
|
4873
|
+
* plain toast. Default is `'destructive'`. `cancelLabel` is the accessible name and tooltip of the undo icon button
|
|
4874
|
+
* (e.g. "Undo changes"); with it the toast has no close button, so it only ends by undoing or running out. Without it
|
|
4875
|
+
* there is no undo button, for a notice that only stays `seconds` and can be closed with the toaster's close button.
|
|
4869
4876
|
*/
|
|
4870
4877
|
export interface YuwCountdownToastOptionsDto {
|
|
4871
4878
|
color?: YuwColorDto;
|
|
@@ -4876,22 +4883,23 @@ export interface YuwCountdownToastOptionsDto {
|
|
|
4876
4883
|
onComplete?: () => void;
|
|
4877
4884
|
onCancel?: () => void;
|
|
4878
4885
|
}
|
|
4879
|
-
/** Settles a countdown toast from outside: `cancel` as its button does, `complete` as running out does. */
|
|
4886
|
+
/** Settles a countdown toast from outside: `cancel` as its undo button does, `complete` as running out does. */
|
|
4880
4887
|
export interface YuwCountdownToastRef {
|
|
4881
4888
|
cancel: () => void;
|
|
4882
4889
|
complete: () => void;
|
|
4883
4890
|
}
|
|
4884
4891
|
/**
|
|
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.
|
|
4892
|
+
* Shows a toast that counts down `seconds` with a bar and, with a `cancelLabel`, an undo icon button, for an action that
|
|
4893
|
+
* runs unless the user takes it back. Running out or the toaster's close button call `onComplete`; the
|
|
4894
|
+
* undo button calls `onCancel`. Hovering the toaster pauses the countdown. It settles once: whichever comes first wins, and
|
|
4895
|
+
* the toast closes with sonner's exit animation. A close that sonner started (the close button) is left to it;
|
|
4896
|
+
* any other is asked of sonner with `delete`, since `dismiss` would drop the toast at once and cut the animation short.
|
|
4889
4897
|
*
|
|
4890
4898
|
* Usage:
|
|
4891
4899
|
* ```ts
|
|
4892
4900
|
* yuwCountdownToast({
|
|
4893
4901
|
* message: (seconds) => `Deleting "Acme" in ${seconds} s`,
|
|
4894
|
-
* cancelLabel: '
|
|
4902
|
+
* cancelLabel: 'Undo changes',
|
|
4895
4903
|
* progressLabel: 'Time left',
|
|
4896
4904
|
* seconds: 10,
|
|
4897
4905
|
* onComplete: () => this.delete(),
|
|
@@ -5369,6 +5377,7 @@ export declare class YuwTabsComponent {
|
|
|
5369
5377
|
readonly tabs: import("@angular/core").InputSignal<YuwTabItemDto[]>;
|
|
5370
5378
|
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
5371
5379
|
readonly variant: import("@angular/core").InputSignal<YuwTabsVariantDto>;
|
|
5380
|
+
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
5381
|
protected readonly _listClass: import("@angular/core").Signal<string>;
|
|
5373
5382
|
protected readonly _resolved: import("@angular/core").Signal<{
|
|
5374
5383
|
template: import("@angular/core").TemplateRef<unknown> | undefined;
|
|
@@ -6977,13 +6986,27 @@ export declare class YuwsFlagCellComponent {
|
|
|
6977
6986
|
};
|
|
6978
6987
|
}, {}, never, never, true, never>;
|
|
6979
6988
|
}
|
|
6989
|
+
/**
|
|
6990
|
+
* Icon button at the end of a row, hidden until the row is hovered or keyboard-focused like the pencil of
|
|
6991
|
+
* `buildYuwActionsColumn`; touch devices keep it visible. `icon` is the SVG itself (e.g. `lucideEye`), so the cell does
|
|
6992
|
+
* not have to register every consumer's icon. The host stops the click so a clickable row does not fire too.
|
|
6993
|
+
*
|
|
6994
|
+
* Inputs:
|
|
6995
|
+
* - `action` (required): Callback run on click. An input because `flexRenderComponent` does not subscribe outputs.
|
|
6996
|
+
* - `destructive`: Draws a red button (`secondary` in the `destructive` color), for an action that removes. Default is
|
|
6997
|
+
* `false`.
|
|
6998
|
+
* - `icon` (required): SVG markup of the icon.
|
|
6999
|
+
* - `label` (required): Accessible name of the button. The consuming app translates it.
|
|
7000
|
+
* - `tooltip`: Hint shown on hover or keyboard focus; empty shows none. The consuming app translates it.
|
|
7001
|
+
*/
|
|
6980
7002
|
export declare class YuwsIconActionCellComponent {
|
|
6981
7003
|
readonly action: import("@angular/core").InputSignal<() => void>;
|
|
6982
7004
|
readonly destructive: import("@angular/core").InputSignal<boolean>;
|
|
6983
7005
|
readonly icon: import("@angular/core").InputSignal<string>;
|
|
6984
7006
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
6985
7007
|
readonly tooltip: import("@angular/core").InputSignal<string>;
|
|
6986
|
-
protected readonly
|
|
7008
|
+
protected readonly color: import("@angular/core").Signal<YuwColorDto>;
|
|
7009
|
+
protected readonly variant: import("@angular/core").Signal<"secondary" | "ghost">;
|
|
6987
7010
|
protected run(): void;
|
|
6988
7011
|
static ɵfac: i0.ɵɵFactoryDeclaration<YuwsIconActionCellComponent, never>;
|
|
6989
7012
|
static ɵcmp: i0.ɵɵComponentDeclaration<YuwsIconActionCellComponent, "yuws-icon-action-cell", never, {
|
|
@@ -8205,6 +8228,7 @@ export interface YuwsListToolbarColumnsLabels {
|
|
|
8205
8228
|
readonly title?: string;
|
|
8206
8229
|
readonly placeholder?: string;
|
|
8207
8230
|
readonly empty: string;
|
|
8231
|
+
readonly reset?: string;
|
|
8208
8232
|
}
|
|
8209
8233
|
/**
|
|
8210
8234
|
* `trigger` names the share button, `title` heads its menu when set, one entry per `YuwTableShareFormat` names its menu
|
|
@@ -8333,6 +8357,8 @@ export declare class YuwsFilterContentDirective {
|
|
|
8333
8357
|
* - `filterGroups`: Filter groups the editor offers; the filter control renders only when set.
|
|
8334
8358
|
* - `filterSets`: Saved filter sets; together with `labels.filters.sets` it enables the sets star.
|
|
8335
8359
|
* - `filtersDisabled`: Disables every control of the filter row. Default is `false`.
|
|
8360
|
+
* - `defaultHiddenColumns`: Ids of the columns hidden by default; with `labels.columns.reset` the column menu offers to
|
|
8361
|
+
* restore them. Default is `[]`.
|
|
8336
8362
|
* - `hiddenColumns`: Two-way (`[(hiddenColumns)]`) ids of the columns currently hidden. Default is `[]`.
|
|
8337
8363
|
* - `hideableColumns`: Options of the columns the user may hide; the columns button renders only when set.
|
|
8338
8364
|
* - `idleColor`: `YuwColorDto` tone of the filter row's outline controls. Default is `'neutral'`.
|
|
@@ -8355,6 +8381,7 @@ export declare class YuwsFilterContentDirective {
|
|
|
8355
8381
|
*/
|
|
8356
8382
|
export declare class YuwsListToolbarComponent {
|
|
8357
8383
|
protected readonly filterContents: import("@angular/core").Signal<readonly YuwsFilterContentDirective[]>;
|
|
8384
|
+
readonly defaultHiddenColumns: import("@angular/core").InputSignal<readonly string[]>;
|
|
8358
8385
|
readonly filterGroups: import("@angular/core").InputSignal<readonly YuwsFilterGroupDto[] | undefined>;
|
|
8359
8386
|
readonly filtersDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
8360
8387
|
readonly filterSets: import("@angular/core").InputSignal<readonly YuwsFilterSetDto[] | undefined>;
|
|
@@ -8380,6 +8407,11 @@ export declare class YuwsListToolbarComponent {
|
|
|
8380
8407
|
protected readonly isMobile: import("@angular/core").Signal<boolean>;
|
|
8381
8408
|
static ɵfac: i0.ɵɵFactoryDeclaration<YuwsListToolbarComponent, never>;
|
|
8382
8409
|
static ɵcmp: i0.ɵɵComponentDeclaration<YuwsListToolbarComponent, "yuws-list-toolbar", never, {
|
|
8410
|
+
"defaultHiddenColumns": {
|
|
8411
|
+
"alias": "defaultHiddenColumns";
|
|
8412
|
+
"required": false;
|
|
8413
|
+
"isSignal": true;
|
|
8414
|
+
};
|
|
8383
8415
|
"filterGroups": {
|
|
8384
8416
|
"alias": "filterGroups";
|
|
8385
8417
|
"required": false;
|