yukit-web 0.0.14 → 0.0.16
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/.npm/_cacache/content-v2/sha512/{91/1c/3dec8712e9649220f813218d92dd5c92b0aefa10a699bcfebe1e796971e7d1b2ec30093f150fa9e6ada9e4751f51343d111d53629289d3e5a4bf3631f23d → 5e/11/2c56cc46533cc988b1ad3c5e54316d97d92e480f8908d0cc332e741390cfff7bf152926325fd764bd8473272d85c1ac13198e6aca85480bdceab1d7324b2} +1 -1
- package/.npm/_cacache/index-v5/64/dc/73c7a26f2e6eb0c711133d96c247da5ecf0eba708cd37c450a7b3c7cb488 +1 -1
- package/.npm/_logs/{2026-09-03T14_06_05_111Z-debug-0.log → 2026-09-09T07_40_32_599Z-debug-0.log} +10 -10
- package/.npm/_logs/{2026-09-03T14_06_05_698Z-debug-0.log → 2026-09-09T07_40_33_128Z-debug-0.log} +2 -2
- package/fesm2022/yukit-web.mjs +248 -127
- package/fesm2022/yukit-web.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/theme/components/button-group.css +36 -0
- package/src/lib/theme/components/button.css +4 -0
- package/src/lib/theme/theme.css +4 -3
- package/types/yukit-web.d.ts +200 -119
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
yuw-button-group > yuw-button > :is(button, a) {
|
|
2
|
+
border-radius: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
yuw-button-group[data-orientation='vertical'] > yuw-button,
|
|
6
|
+
yuw-button-group[data-orientation='vertical'] > yuw-button > :is(button, a) {
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
yuw-button-group[data-orientation='horizontal'] > yuw-button:not(:first-child) > :is(button, a) {
|
|
11
|
+
border-inline-start-width: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
yuw-button-group[data-orientation='vertical'] > yuw-button:not(:first-child) > :is(button, a) {
|
|
15
|
+
border-block-start-width: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
yuw-button-group[data-orientation='horizontal'] > yuw-button:first-child > :is(button, a) {
|
|
19
|
+
border-start-start-radius: var(--radius);
|
|
20
|
+
border-end-start-radius: var(--radius);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
yuw-button-group[data-orientation='horizontal'] > yuw-button:last-child > :is(button, a) {
|
|
24
|
+
border-start-end-radius: var(--radius);
|
|
25
|
+
border-end-end-radius: var(--radius);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
yuw-button-group[data-orientation='vertical'] > yuw-button:first-child > :is(button, a) {
|
|
29
|
+
border-start-start-radius: var(--radius);
|
|
30
|
+
border-start-end-radius: var(--radius);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
yuw-button-group[data-orientation='vertical'] > yuw-button:last-child > :is(button, a) {
|
|
34
|
+
border-end-start-radius: var(--radius);
|
|
35
|
+
border-end-end-radius: var(--radius);
|
|
36
|
+
}
|
package/src/lib/theme/theme.css
CHANGED
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Spartan css overwrites
|
|
11
11
|
*/
|
|
12
|
+
@import './components/button.css';
|
|
13
|
+
@import './components/button-group.css';
|
|
12
14
|
@import './spartan-overwrites/accordion.css';
|
|
13
15
|
|
|
14
16
|
@layer base {
|
|
15
|
-
|
|
16
17
|
*,
|
|
17
18
|
::after,
|
|
18
19
|
::before {
|
|
@@ -30,12 +31,12 @@
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
button:not(:disabled),
|
|
33
|
-
[role=
|
|
34
|
+
[role='button']:not(:disabled) {
|
|
34
35
|
cursor: pointer;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
button:disabled,
|
|
38
|
-
[role=
|
|
39
|
+
[role='button']:disabled {
|
|
39
40
|
cursor: not-allowed;
|
|
40
41
|
}
|
|
41
42
|
|
package/types/yukit-web.d.ts
CHANGED
|
@@ -106,63 +106,10 @@ interface YuwTextFieldContract {
|
|
|
106
106
|
type YuwColorDto = 'primary' | 'secondary' | 'destructive' | 'success' | 'warning' | 'info' | 'muted' | 'violet';
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* A single
|
|
109
|
+
* A single action button, rendered as a `<button>` or, when `href` is set, an `<a>`.
|
|
110
110
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* one out carries its own.
|
|
114
|
-
*
|
|
115
|
-
* `label` is data the parent supplies, not a component-owned default — the same i18n rule
|
|
116
|
-
* `YuwBreadcrumbItemDto` and `YuwSelectOptionDto` follow.
|
|
117
|
-
*/
|
|
118
|
-
interface YuwButtonGroupItemDto {
|
|
119
|
-
id: string;
|
|
120
|
-
label: string;
|
|
121
|
-
kind?: 'button';
|
|
122
|
-
variant?: ButtonVariants['variant'];
|
|
123
|
-
size?: ButtonVariants['size'];
|
|
124
|
-
color?: YuwColorDto;
|
|
125
|
-
disabled?: boolean;
|
|
126
|
-
href?: string;
|
|
127
|
-
target?: string;
|
|
128
|
-
type?: 'button' | 'submit' | 'reset';
|
|
129
|
-
ariaLabel?: string;
|
|
130
|
-
yuwDropdownMenuTrigger?: TemplateRef<unknown> | undefined;
|
|
131
|
-
transparent?: boolean;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* A static, non-interactive segment welded into the same row as the buttons — a leading caption, a
|
|
135
|
-
* trailing unit, a checkbox that applies to the whole group.
|
|
136
|
-
*
|
|
137
|
-
* A separate type rather than optional fields on `YuwButtonGroupItemDto`: a text segment honors none
|
|
138
|
-
* of that interface's button surface, and merging them would hand consumers fields that silently do
|
|
139
|
-
* nothing on half the entries.
|
|
140
|
-
*
|
|
141
|
-
* `label` renders as-is. For content a string can't express (a `yuw-checkbox`, custom markup),
|
|
142
|
-
* declare an `<ng-template yuwButtonGroupText="<id>">` whose id matches this entry; the template
|
|
143
|
-
* wins over `label` when both are present.
|
|
144
|
-
*/
|
|
145
|
-
interface YuwButtonGroupTextDto {
|
|
146
|
-
id: string;
|
|
147
|
-
kind: 'text';
|
|
148
|
-
label?: string;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* What `<yuw-button>`'s `buttons` input accepts: buttons, text segments, in whatever order the
|
|
152
|
-
* consumer lists them.
|
|
153
|
-
*
|
|
154
|
-
* `kind` is optional on the button variant, so existing `{id, label}` arrays keep working: an entry
|
|
155
|
-
* without `kind` is a button.
|
|
156
|
-
*/
|
|
157
|
-
type YuwButtonGroupEntryDto = YuwButtonGroupItemDto | YuwButtonGroupTextDto;
|
|
158
|
-
/** What `<yuw-button>` emits from `buttonClicked` in the group form. */
|
|
159
|
-
interface YuwButtonGroupClickDto {
|
|
160
|
-
id: string;
|
|
161
|
-
event: MouseEvent;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Button component supporting single action button or grouped button options.
|
|
111
|
+
* For a welded row of buttons driven by data, use `<yuw-button-group>`, which renders one of these
|
|
112
|
+
* per entry.
|
|
166
113
|
*
|
|
167
114
|
* Inputs:
|
|
168
115
|
* - `variant`: Button style variant (`'default'`, `'secondary'`, `'outline'`, `'destructive'`, `'ghost'`, `'link'`). Default is `'default'`.
|
|
@@ -173,60 +120,34 @@ interface YuwButtonGroupClickDto {
|
|
|
173
120
|
* - `href`: Renders button as an anchor tag navigating to specified URL.
|
|
174
121
|
* - `target`: Target attribute for link button (e.g. `'_blank'`).
|
|
175
122
|
* - `transparent`: Removes background and border styling.
|
|
176
|
-
* - `class`: Extra CSS classes merged onto the inner button/anchor
|
|
123
|
+
* - `class`: Extra CSS classes merged onto the inner button/anchor; merged last, so they win over the component's own classes.
|
|
177
124
|
* - `yuwDropdownMenuTrigger`: Optional dropdown menu template reference to trigger.
|
|
178
125
|
* - `ariaLabel`: Accessible label for screen readers.
|
|
179
|
-
* - `buttons`: Array of group entries (`YuwButtonGroupEntryDto[]`) to render as a welded button group.
|
|
180
|
-
* A `kind: 'text'` entry renders a static, non-interactive segment instead of a button; give it an
|
|
181
|
-
* `<ng-template yuwButtonGroupText="<id>">` to fill it with markup rather than a plain `label`.
|
|
182
|
-
* - `orientation`: Group layout orientation (`'horizontal'` or `'vertical'`). Default is `'horizontal'`.
|
|
183
|
-
* - `groupAriaLabel`: Accessible name for button group container.
|
|
184
126
|
*
|
|
185
127
|
* Outputs:
|
|
186
|
-
* - `clicked`: Emits MouseEvent on
|
|
187
|
-
* - `buttonClicked`: Emits object containing clicked button `id` and `event` in group mode.
|
|
128
|
+
* - `clicked`: Emits MouseEvent on click.
|
|
188
129
|
*
|
|
189
130
|
* `_btnClass` merges our variant layer with the consumer's `class`, which goes last so it wins.
|
|
190
131
|
*
|
|
191
|
-
* `_resolved` gives each group entry everything its branch of the template needs. A text entry has
|
|
192
|
-
* no variant/size/color to fall back to, so it takes its own path rather than being run through the
|
|
193
|
-
* button resolver, which would invent fields its DTO doesn't declare. Its content template is looked
|
|
194
|
-
* up through a `Map` rather than a per-entry `.find()`, which would make an n-entry group cost n².
|
|
195
|
-
*
|
|
196
132
|
* The host carries `inline-flex` so it is a real box rather than an inline one: an overlay trigger
|
|
197
133
|
* directive composed onto `<yuw-button>` (see `YuwPopoverTriggerDirective`) anchors its panel to the
|
|
198
134
|
* host element, and an inline host reports a rect that misses the button's own box. Elements that
|
|
199
135
|
* need to be positioned — an overlay's close button, for instance — get a positioned wrapper around
|
|
200
136
|
* `<yuw-button>` rather than relying on the host's own display.
|
|
201
137
|
*
|
|
202
|
-
*
|
|
138
|
+
* Usage:
|
|
203
139
|
* ```html
|
|
204
140
|
* <yuw-button variant="outline" color="primary" (clicked)="onSave()">Save</yuw-button>
|
|
205
141
|
* <yuw-button href="/dashboard">Navigate</yuw-button>
|
|
206
142
|
* ```
|
|
207
|
-
*
|
|
208
|
-
* Button Group Usage:
|
|
209
|
-
* ```html
|
|
210
|
-
* <yuw-button [buttons]="actionList" (buttonClicked)="onAction($event)" />
|
|
211
|
-
*
|
|
212
|
-
* <yuw-button [buttons]="[{id: 'caption', kind: 'text', label: 'Sort by'}, ...sortActions]">
|
|
213
|
-
* <ng-template yuwButtonGroupText="select-all">
|
|
214
|
-
* <yuw-checkbox [(checked)]="allSelected" />
|
|
215
|
-
* </ng-template>
|
|
216
|
-
* </yuw-button>
|
|
217
|
-
* ```
|
|
218
143
|
*/
|
|
219
144
|
declare class YuwButtonComponent {
|
|
220
145
|
private readonly _host;
|
|
221
|
-
private readonly _texts;
|
|
222
146
|
readonly animationDisabled: _angular_core.InputSignal<boolean>;
|
|
223
147
|
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
224
|
-
readonly buttons: _angular_core.InputSignal<YuwButtonGroupEntryDto[] | undefined>;
|
|
225
148
|
readonly color: _angular_core.InputSignal<YuwColorDto>;
|
|
226
149
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
227
|
-
readonly groupAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
228
150
|
readonly href: _angular_core.InputSignal<string | undefined>;
|
|
229
|
-
readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
230
151
|
readonly size: _angular_core.InputSignal<"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined>;
|
|
231
152
|
readonly target: _angular_core.InputSignal<string | undefined>;
|
|
232
153
|
readonly transparent: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -234,63 +155,173 @@ declare class YuwButtonComponent {
|
|
|
234
155
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
235
156
|
readonly variant: _angular_core.InputSignal<"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined>;
|
|
236
157
|
readonly yuwDropdownMenuTrigger: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
237
|
-
readonly buttonClicked: _angular_core.OutputEmitterRef<YuwButtonGroupClickDto>;
|
|
238
158
|
readonly clicked: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
239
|
-
protected readonly _textClass = "bg-transparent text-foreground border-border dark:border-input";
|
|
240
159
|
protected readonly _animationDisabled: _angular_core.Signal<boolean>;
|
|
241
|
-
protected readonly _effectiveVariant: _angular_core.Signal<"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined>;
|
|
242
160
|
protected readonly _btnClass: _angular_core.Signal<string>;
|
|
243
|
-
protected readonly
|
|
244
|
-
protected
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
161
|
+
protected readonly _effectiveVariant: _angular_core.Signal<"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined>;
|
|
162
|
+
protected onClick(event: MouseEvent): void;
|
|
163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwButtonComponent, never>;
|
|
164
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwButtonComponent, "yuw-button", never, { "animationDisabled": { "alias": "animationDisabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "transparent": { "alias": "transparent"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "yuwDropdownMenuTrigger": { "alias": "yuwDropdownMenuTrigger"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["[yuwButtonIcon]", "*", "[yuwButtonIcon]", "*"], true, never>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A single button in `<yuw-button-group>`'s `buttons` input.
|
|
169
|
+
*
|
|
170
|
+
* Every field mirrors the `<yuw-button>` input of the same name. A field declared here wins over the
|
|
171
|
+
* group-level input of the same name — the group sets the row's base, an entry states its specific
|
|
172
|
+
* case — so a uniform row is `{id, label}` entries plus one group-level `variant`, and only the odd
|
|
173
|
+
* one out carries its own.
|
|
174
|
+
*
|
|
175
|
+
* `label` renders as plain text. For markup a string can't express, declare an
|
|
176
|
+
* `<ng-template yuwButtonGroupContent="<id>">` whose id matches this entry; the template wins over
|
|
177
|
+
* `label` when both are present. `label` is data the parent supplies, not a component-owned
|
|
178
|
+
* default, so the consuming app owns translation.
|
|
179
|
+
*
|
|
180
|
+
* `interactive: false` renders the entry as inert chrome — transparent, no hover, no click, not
|
|
181
|
+
* focusable — for a caption or a unit welded into the row.
|
|
182
|
+
*
|
|
183
|
+
* `selected` marks the entry as the active one in a segmented row, so the parent flips one boolean
|
|
184
|
+
* rather than rewriting appearance across the array on every click. It resolves most-specific
|
|
185
|
+
* first: this entry's `selectedColor`, then its `color`, then the group's `selectedColor`, then the
|
|
186
|
+
* group's `color`. An entry declaring `selectedColor` therefore keeps it even in a group that sets
|
|
187
|
+
* its own, which is the point — the entry is the specific case.
|
|
188
|
+
*/
|
|
189
|
+
interface YuwButtonGroupItemDto {
|
|
190
|
+
id: string;
|
|
191
|
+
label?: string;
|
|
192
|
+
variant?: ButtonVariants['variant'];
|
|
193
|
+
size?: ButtonVariants['size'];
|
|
194
|
+
color?: YuwColorDto;
|
|
195
|
+
transparent?: boolean;
|
|
196
|
+
selected?: boolean;
|
|
197
|
+
selectedVariant?: ButtonVariants['variant'];
|
|
198
|
+
selectedColor?: YuwColorDto;
|
|
199
|
+
interactive?: boolean;
|
|
200
|
+
disabled?: boolean;
|
|
201
|
+
href?: string;
|
|
202
|
+
target?: string;
|
|
203
|
+
type?: 'button' | 'submit' | 'reset';
|
|
204
|
+
ariaLabel?: string;
|
|
205
|
+
yuwDropdownMenuTrigger?: TemplateRef<unknown>;
|
|
206
|
+
}
|
|
207
|
+
/** What `<yuw-button-group>` emits from `buttonClicked`. */
|
|
208
|
+
interface YuwButtonGroupClickDto {
|
|
209
|
+
id: string;
|
|
210
|
+
event: MouseEvent;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A welded row of buttons driven by data.
|
|
215
|
+
*
|
|
216
|
+
* Each entry renders a real `<yuw-button>`, so every button input — `variant`, `color`, `size`,
|
|
217
|
+
* `transparent`, `href`, the dropdown trigger — behaves inside the group exactly as it does on a
|
|
218
|
+
* standalone button, and the theme's `data-yuw-color` layer applies unchanged. The group only owns
|
|
219
|
+
* what a row adds: which corners stay rounded and which side draws each seam.
|
|
220
|
+
*
|
|
221
|
+
* Inputs:
|
|
222
|
+
* - `buttons`: The entries to render (`YuwButtonGroupItemDto[]`), in order.
|
|
223
|
+
* - `variant`, `size`, `color`: The row's base appearance. An entry that declares its own wins,
|
|
224
|
+
* since a per-entry value is by definition the specific case.
|
|
225
|
+
* - `selectedVariant`, `selectedColor`: The row's appearance for an entry marked `selected`,
|
|
226
|
+
* mirroring `variant`/`color`. Unset by default, in which case a selected entry keeps the row's
|
|
227
|
+
* `variant`/`color` unless it states its own.
|
|
228
|
+
* - `orientation`: Layout direction (`'horizontal'`, `'vertical'`). Default is `'horizontal'`.
|
|
229
|
+
* The seams rotate with it: a vertical group's entries own their bottom border and round only
|
|
230
|
+
* their top (first) or bottom (last) corners.
|
|
231
|
+
* - `ariaLabel`: Accessible name for the `role="group"` container. User-facing text the consuming
|
|
232
|
+
* app is responsible for translating.
|
|
233
|
+
*
|
|
234
|
+
* Outputs:
|
|
235
|
+
* - `buttonClicked`: Emits the clicked entry's `id` and the `MouseEvent`. An entry with
|
|
236
|
+
* `interactive: false` is inert chrome and never emits.
|
|
237
|
+
*
|
|
238
|
+
* An entry's content is its `label`, or an `<ng-template yuwButtonGroupContent="<id>">` when it
|
|
239
|
+
* needs markup instead of a string.
|
|
240
|
+
*
|
|
241
|
+
* `_resolved` walks the entries once, resolving each value most-specific-first: the entry's
|
|
242
|
+
* state-matching field, then the entry's base field, then the group's state-matching input, then
|
|
243
|
+
* the group's base. An entry always outranks the group, so an entry carrying `selectedColor` keeps
|
|
244
|
+
* it in a row that sets its own — the entry is the specific case by definition. Every step is
|
|
245
|
+
* `undefined` until someone sets it, so no level can be shadowed by a hardcoded default.
|
|
246
|
+
* Content templates are read from a `Map` rather than a per-entry `.find()`, which would make an
|
|
247
|
+
* n-entry group cost n².
|
|
248
|
+
*
|
|
249
|
+
* Seams are pure CSS (`theme/components/button-group.css`), not classes. The helm's base `border`
|
|
250
|
+
* sets all four sides and re-applies its own radius at runtime through `classes()`, and tailwind-
|
|
251
|
+
* merge cannot drop a side from `border` — `border-y border-e` only re-asserts widths, leaving the
|
|
252
|
+
* leading border in place, which is what made each entry draw its own left edge and tint the seam
|
|
253
|
+
* with the wrong entry's color. The stylesheet zeroes the leading border width and owns the corners,
|
|
254
|
+
* where no utility class can displace it.
|
|
255
|
+
*
|
|
256
|
+
* Usage:
|
|
257
|
+
* ```html
|
|
258
|
+
* <yuw-button-group [buttons]="alignActions" (buttonClicked)="onAction($event)" />
|
|
259
|
+
*
|
|
260
|
+
* <yuw-button-group [buttons]="entries" variant="outline" color="primary">
|
|
261
|
+
* <ng-template yuwButtonGroupContent="count">
|
|
262
|
+
* <yuw-badge>{{ total() }}</yuw-badge>
|
|
263
|
+
* </ng-template>
|
|
264
|
+
* </yuw-button-group>
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
declare class YuwButtonGroupComponent {
|
|
268
|
+
private readonly _contents;
|
|
269
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
270
|
+
readonly buttons: _angular_core.InputSignal<readonly YuwButtonGroupItemDto[]>;
|
|
271
|
+
readonly color: _angular_core.InputSignal<YuwColorDto>;
|
|
272
|
+
readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
273
|
+
readonly selectedColor: _angular_core.InputSignal<YuwColorDto | undefined>;
|
|
274
|
+
readonly selectedVariant: _angular_core.InputSignal<"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined>;
|
|
275
|
+
readonly size: _angular_core.InputSignal<"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined>;
|
|
276
|
+
readonly variant: _angular_core.InputSignal<"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined>;
|
|
277
|
+
readonly buttonClicked: _angular_core.OutputEmitterRef<YuwButtonGroupClickDto>;
|
|
278
|
+
protected readonly _resolved: _angular_core.Signal<{
|
|
279
|
+
interactive: boolean;
|
|
280
|
+
template: _angular_core.TemplateRef<unknown> | undefined;
|
|
250
281
|
variant: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
251
282
|
size: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
252
283
|
color: YuwColorDto;
|
|
284
|
+
transparent: boolean;
|
|
253
285
|
disabled: boolean;
|
|
254
286
|
type: "button" | "submit" | "reset";
|
|
255
287
|
class: string;
|
|
256
288
|
id: string;
|
|
257
|
-
label
|
|
258
|
-
|
|
289
|
+
label?: string;
|
|
290
|
+
selected?: boolean;
|
|
291
|
+
selectedVariant?: ButtonVariants["variant"];
|
|
292
|
+
selectedColor?: YuwColorDto;
|
|
259
293
|
href?: string;
|
|
260
294
|
target?: string;
|
|
261
295
|
ariaLabel?: string;
|
|
262
|
-
yuwDropdownMenuTrigger?: TemplateRef<unknown
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwButtonComponent, never>;
|
|
268
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwButtonComponent, "yuw-button", never, { "animationDisabled": { "alias": "animationDisabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "groupAriaLabel": { "alias": "groupAriaLabel"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "transparent": { "alias": "transparent"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "yuwDropdownMenuTrigger": { "alias": "yuwDropdownMenuTrigger"; "required": false; "isSignal": true; }; }, { "buttonClicked": "buttonClicked"; "clicked": "clicked"; }, ["_texts"], ["[yuwButtonIcon]", "*", "[yuwButtonIcon]", "*"], true, never>;
|
|
296
|
+
yuwDropdownMenuTrigger?: _angular_core.TemplateRef<unknown>;
|
|
297
|
+
}[]>;
|
|
298
|
+
protected onClick(entry: YuwButtonGroupItemDto, event: MouseEvent): void;
|
|
299
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwButtonGroupComponent, never>;
|
|
300
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuwButtonGroupComponent, "yuw-button-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "buttons": { "alias": "buttons"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "selectedColor": { "alias": "selectedColor"; "required": false; "isSignal": true; }; "selectedVariant": { "alias": "selectedVariant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "buttonClicked": "buttonClicked"; }, ["_contents"], never, true, never>;
|
|
269
301
|
}
|
|
270
302
|
|
|
271
303
|
/**
|
|
272
|
-
* Declares the content of a single
|
|
273
|
-
*
|
|
274
|
-
* in the `buttons` input.
|
|
304
|
+
* Declares the content of a single entry inside `<yuw-button-group>`. Apply it to an
|
|
305
|
+
* `<ng-template>` and pass the id of the entry it belongs to.
|
|
275
306
|
*
|
|
276
|
-
* Exists because
|
|
277
|
-
*
|
|
278
|
-
* back to its `label`, so the plain-string case needs no template at all.
|
|
307
|
+
* Exists because an entry's content often isn't a string — an icon with a count, a checkbox, a
|
|
308
|
+
* badge — and markup cannot travel through a data array. An entry whose id has no matching
|
|
309
|
+
* template falls back to its `label`, so the plain-string case needs no template at all.
|
|
279
310
|
*
|
|
280
311
|
* Usage:
|
|
281
312
|
* ```html
|
|
282
|
-
* <yuw-button [buttons]="entries">
|
|
283
|
-
* <ng-template
|
|
313
|
+
* <yuw-button-group [buttons]="entries">
|
|
314
|
+
* <ng-template yuwButtonGroupContent="select-all">
|
|
284
315
|
* <yuw-checkbox [(checked)]="allSelected" />
|
|
285
316
|
* </ng-template>
|
|
286
|
-
* </yuw-button>
|
|
317
|
+
* </yuw-button-group>
|
|
287
318
|
* ```
|
|
288
319
|
*/
|
|
289
|
-
declare class
|
|
320
|
+
declare class YuwButtonGroupContentDirective {
|
|
290
321
|
readonly templateRef: TemplateRef<unknown>;
|
|
291
322
|
readonly entryId: _angular_core.InputSignal<string>;
|
|
292
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
293
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
323
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwButtonGroupContentDirective, never>;
|
|
324
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<YuwButtonGroupContentDirective, "ng-template[yuwButtonGroupContent]", never, { "entryId": { "alias": "yuwButtonGroupContent"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
294
325
|
}
|
|
295
326
|
|
|
296
327
|
/**
|
|
@@ -2645,6 +2676,18 @@ declare class YuwSidebarRailService {
|
|
|
2645
2676
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<YuwSidebarRailService>;
|
|
2646
2677
|
}
|
|
2647
2678
|
|
|
2679
|
+
/**
|
|
2680
|
+
* - `src`: image URL. Omit to show `fallback` alone, which is also what a failed load falls back to.
|
|
2681
|
+
* - `alt`: accessible name of the image, supplied already translated. Set it to `''` when `label`
|
|
2682
|
+
* already names the same thing, so a screen reader does not read the name twice.
|
|
2683
|
+
* - `fallback`: initials shown while the image loads, fails, or is absent. Not optional: an avatar
|
|
2684
|
+
* with no `src` and no `fallback` is an empty circle.
|
|
2685
|
+
*/
|
|
2686
|
+
interface YuwSidebarAvatarDto {
|
|
2687
|
+
alt: string;
|
|
2688
|
+
fallback: string;
|
|
2689
|
+
src?: string;
|
|
2690
|
+
}
|
|
2648
2691
|
/**
|
|
2649
2692
|
* Where a sidebar entry points.
|
|
2650
2693
|
*
|
|
@@ -2697,6 +2740,10 @@ interface YuwSidebarSubItemDto extends YuwSidebarNavigationDto {
|
|
|
2697
2740
|
* navigates and toggles.
|
|
2698
2741
|
*
|
|
2699
2742
|
* - `label`: text of the entry, supplied already translated — the sidebar owns no user-facing copy.
|
|
2743
|
+
* - `avatar`: image identifying a person or entity, rendered in place of `icon` at 40px. An entry
|
|
2744
|
+
* with one is taller than an icon entry — the avatar is what sets the row height, expanded and on
|
|
2745
|
+
* the rail alike. `icon` is ignored when both are given, since they compete for the one leading
|
|
2746
|
+
* slot; pass whichever the entry actually is rather than both.
|
|
2700
2747
|
* - `icon`: name of a registered `@ng-icons` icon. Because the *consumer* chooses this name, the
|
|
2701
2748
|
* consuming app is responsible for `provideIcons()`-ing it; `provideIcons` is a component-level
|
|
2702
2749
|
* provider, so a name registered on the component hosting the sidebar resolves here through the
|
|
@@ -2712,6 +2759,7 @@ interface YuwSidebarSubItemDto extends YuwSidebarNavigationDto {
|
|
|
2712
2759
|
interface YuwSidebarItemDto extends YuwSidebarNavigationDto {
|
|
2713
2760
|
id: string;
|
|
2714
2761
|
label: string;
|
|
2762
|
+
avatar?: YuwSidebarAvatarDto;
|
|
2715
2763
|
icon?: string;
|
|
2716
2764
|
badge?: string;
|
|
2717
2765
|
tooltip?: string;
|
|
@@ -2814,7 +2862,10 @@ declare class YuwSidebarSubmenuService {
|
|
|
2814
2862
|
* button that reports through `itemClicked`. An item with `children` gets a submenu that follows
|
|
2815
2863
|
* the sidebar's own state: an accordion while the panel is open, and a sheet sliding out beside the
|
|
2816
2864
|
* rail once it is collapsed to icons, so nested entries stay reachable there. Its `expanded`
|
|
2817
|
-
* field seeds the accordion; the item holding the active route opens on its own.
|
|
2865
|
+
* field seeds the accordion; the item holding the active route opens on its own. An item may lead
|
|
2866
|
+
* with an `avatar` instead of an `icon` — a user account or a venue — which renders at 40px and
|
|
2867
|
+
* makes that row taller than an icon row in both states, and combines with `children` like any
|
|
2868
|
+
* other entry.
|
|
2818
2869
|
* - `footer`: The same, rendered into the footer region.
|
|
2819
2870
|
*
|
|
2820
2871
|
* Outputs:
|
|
@@ -3125,6 +3176,36 @@ declare class YuwSidebarMenuButtonDirective {
|
|
|
3125
3176
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwSidebarMenuButtonDirective, never>;
|
|
3126
3177
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<YuwSidebarMenuButtonDirective, "button[yuwSidebarMenuButton], a[yuwSidebarMenuButton]", never, {}, {}, never, never, true, [{ directive: typeof i1$d.HlmSidebarMenuButton; inputs: { "variant": "variant"; "size": "size"; "isActive": "isActive"; "closeMobileSidebarOnClick": "closeMobileSidebarOnClick"; }; outputs: {}; }]>;
|
|
3127
3178
|
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Applied alongside `[yuwSidebarMenuButton]` on an entry whose leading slot is a 40px avatar rather
|
|
3181
|
+
* than a 16px icon, carrying {@link yuwSidebarMenuAvatarButtonClass}.
|
|
3182
|
+
*
|
|
3183
|
+
* A directive rather than a `[class]` binding on the button, because a binding cannot win this
|
|
3184
|
+
* merge. `classes()` (helm/utils) applies its registered *sources* in registration order and then
|
|
3185
|
+
* appends the element's `baseClasses` — captured from the static `class` host attribute — last. An
|
|
3186
|
+
* Angular `[class]` binding is neither: it writes the `class` attribute directly, races the
|
|
3187
|
+
* `className` assignment `classes()` makes for its own sources, and is reclassified by the library's
|
|
3188
|
+
* MutationObserver only after the fact. The observed result was the helm's `h-8` surviving and the
|
|
3189
|
+
* override being dropped, leaving the 40px avatar clipped inside a 32px `overflow-hidden` button.
|
|
3190
|
+
* Registering as another source puts this class after both the helm's and
|
|
3191
|
+
* `[yuwSidebarMenuButton]`'s, which is the ordering `twMerge` needs to displace them.
|
|
3192
|
+
*
|
|
3193
|
+
* Separate from `[yuwSidebarMenuButton]` rather than an input on it, because the two are not the same
|
|
3194
|
+
* role: this is the geometry of one kind of entry, and an entry either leads with an avatar or it does
|
|
3195
|
+
* not. Hand-written markup applies it bare (`<a yuwSidebarMenuButton yuwSidebarMenuAvatarButton>`)
|
|
3196
|
+
* next to its own `<yuw-avatar>`.
|
|
3197
|
+
*
|
|
3198
|
+
* It carries a value because `YuwSidebarNavComponent` renders every entry through the same three
|
|
3199
|
+
* branches and cannot attach a directive conditionally — an attribute selector matches on presence, so
|
|
3200
|
+
* the nav applies it to every entry and passes whether that entry actually has an avatar. Its default
|
|
3201
|
+
* is `true` so the bare, hand-written form needs no value.
|
|
3202
|
+
*/
|
|
3203
|
+
declare class YuwSidebarMenuAvatarButtonDirective {
|
|
3204
|
+
readonly enabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
3205
|
+
constructor();
|
|
3206
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwSidebarMenuAvatarButtonDirective, never>;
|
|
3207
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<YuwSidebarMenuAvatarButtonDirective, "[yuwSidebarMenuAvatarButton]", never, { "enabled": { "alias": "yuwSidebarMenuAvatarButton"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3208
|
+
}
|
|
3128
3209
|
/** Trailing count or status badge of a sidebar menu item. */
|
|
3129
3210
|
declare class YuwSidebarMenuBadgeDirective {
|
|
3130
3211
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuwSidebarMenuBadgeDirective, never>;
|
|
@@ -3180,5 +3261,5 @@ declare const YUW_SIDEBAR_RAIL_PADDING = "22px";
|
|
|
3180
3261
|
declare const YUW_SIDEBAR_RAIL_ICON_SIZE = "20px";
|
|
3181
3262
|
declare const YUW_SIDEBAR_RAIL_WIDTH = "78px";
|
|
3182
3263
|
|
|
3183
|
-
export { DATATABLE_ALIGN_CLASS, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, YUW_SIDEBAR_RAIL_PADDING, YUW_SIDEBAR_RAIL_WIDTH, YuwAccordion, YuwAccordionContentComponent, YuwAccordionImports, YuwAccordionItem, YuwAccordionTriggerComponent, YuwAlertActionDirective, YuwAlertComponent, YuwAlertDescriptionDirective, YuwAlertDialogComponent, YuwAlertDialogMediaDirective, YuwAlertDialogTriggerDirective, YuwAlertImports, YuwAlertTitleDirective, YuwAttachmentActionDirective, YuwAttachmentActionsDirective, YuwAttachmentContentDirective, YuwAttachmentDescriptionDirective, YuwAttachmentDirective, YuwAttachmentGroupDirective, YuwAttachmentMediaDirective, YuwAttachmentTitleDirective, YuwAttachmentTriggerDirective, YuwAvatarComponent, YuwBadgeComponent, YuwBreadcrumbComponent, YuwButtonComponent,
|
|
3184
|
-
export type { YuwAlertDialogSizeDto, YuwAlertVariantDto, YuwAvatarGroupItemDto, YuwAvatarSizeDto, YuwBreadcrumbItemDto, YuwButtonGroupClickDto,
|
|
3264
|
+
export { DATATABLE_ALIGN_CLASS, YUW_PASSWORD_REVEAL_STATES, YUW_SIDEBAR_RAIL_ICON_SIZE, YUW_SIDEBAR_RAIL_PADDING, YUW_SIDEBAR_RAIL_WIDTH, YuwAccordion, YuwAccordionContentComponent, YuwAccordionImports, YuwAccordionItem, YuwAccordionTriggerComponent, YuwAlertActionDirective, YuwAlertComponent, YuwAlertDescriptionDirective, YuwAlertDialogComponent, YuwAlertDialogMediaDirective, YuwAlertDialogTriggerDirective, YuwAlertImports, YuwAlertTitleDirective, YuwAttachmentActionDirective, YuwAttachmentActionsDirective, YuwAttachmentContentDirective, YuwAttachmentDescriptionDirective, YuwAttachmentDirective, YuwAttachmentGroupDirective, YuwAttachmentMediaDirective, YuwAttachmentTitleDirective, YuwAttachmentTriggerDirective, YuwAvatarComponent, YuwBadgeComponent, YuwBreadcrumbComponent, YuwButtonComponent, YuwButtonGroupComponent, YuwButtonGroupContentDirective, YuwCaptionDirective, YuwCardActionDirective, YuwCardContentDirective, YuwCardDescriptionDirective, YuwCardDirective, YuwCardFooterDirective, YuwCardHeaderDirective, YuwCardImports, YuwCardTitleDirective, YuwCheckboxComponent, YuwComboboxComponent, YuwComboboxItemDirective, YuwContextMenuCheckboxDirective, YuwContextMenuCheckboxIndicatorComponent, YuwContextMenuDirective, YuwContextMenuGroupDirective, YuwContextMenuImports, YuwContextMenuItemDirective, YuwContextMenuLabelDirective, YuwContextMenuRadioDirective, YuwContextMenuRadioIndicatorComponent, YuwContextMenuSeparatorDirective, YuwContextMenuShortcutDirective, YuwContextMenuSubDirective, YuwContextMenuSubIndicatorComponent, YuwContextMenuSubTriggerDirective, YuwContextMenuTriggerDirective, YuwDatatableComponent, YuwDatatablePaginationDirective, YuwDatatableRowSelect, YuwDatepickerComponent, YuwDialogCloseDirective, YuwDialogComponent, YuwDialogFooterDirective, YuwDialogImports, YuwDialogTriggerDirective, YuwEmptyContentDirective, YuwEmptyDescriptionDirective, YuwEmptyDirective, YuwEmptyHeaderDirective, YuwEmptyImports, YuwEmptyMediaDirective, YuwEmptyTitleDirective, YuwInputAddonImports, YuwInputComponent, YuwInputOtpComponent, YuwItemActionsDirective, YuwItemContentDirective, YuwItemDescriptionDirective, YuwItemDirective, YuwItemFooterDirective, YuwItemGroupDirective, YuwItemHeaderDirective, YuwItemImports, YuwItemMediaDirective, YuwItemSeparatorDirective, YuwItemTitleDirective, YuwLabel, YuwLeftAddonDirective, YuwPaginationComponent, YuwPasswordInputComponent, YuwPopoverComponent, YuwPopoverTriggerDirective, YuwRadioGroupComponent, YuwRightAddonDirective, YuwSearchInputComponent, YuwSheetCloseDirective, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetImports, YuwSheetTriggerDirective, YuwSidebarComponent, YuwSidebarContentDirective, YuwSidebarContentExtraDirective, YuwSidebarFooterDirective, YuwSidebarFooterExtraDirective, YuwSidebarGroupContentDirective, YuwSidebarGroupDirective, YuwSidebarGroupLabelDirective, YuwSidebarHeaderDirective, YuwSidebarInsetDirective, YuwSidebarMenuAvatarButtonDirective, YuwSidebarMenuBadgeDirective, YuwSidebarMenuButtonDirective, YuwSidebarMenuDirective, YuwSidebarMenuItemDirective, YuwSidebarMenuSubButtonDirective, YuwSidebarMenuSubDirective, YuwSidebarMenuSubItemDirective, YuwSidebarRailDirective, YuwSidebarRailService, YuwSidebarSeparatorDirective, YuwSidebarSubmenuService, YuwSidebarTriggerComponent, YuwSidebarWrapperDirective, YuwSkeletonDirective, YuwSpinnerComponent, YuwSwitchComponent, YuwTBodyDirective, YuwTFootDirective, YuwTHeadDirective, YuwTabPanelDirective, YuwTableContainerDirective, YuwTableDirective, YuwTableImports, YuwTabsComponent, YuwTdDirective, YuwTextareaComponent, YuwThDirective, YuwToasterComponent, YuwTooltipDirective, YuwTrDirective, YuwValueAccessorBase, buildInputOtpGroups, cn, datatableCellVariants, datatableContainerVariants, datatableHeadVariants, datatableHeaderCellVariants, datatableRowVariants, getPaginationRange, provideValueAccessor, totalInputOtpLength };
|
|
3265
|
+
export type { YuwAlertDialogSizeDto, YuwAlertVariantDto, YuwAvatarGroupItemDto, YuwAvatarSizeDto, YuwBreadcrumbItemDto, YuwButtonGroupClickDto, YuwButtonGroupItemDto, YuwColorDto, YuwComboboxItemContext, YuwComboboxOptionDto, YuwComboboxValue, YuwDatatableAlign, YuwDatatableAppearanceDto, YuwDatatableColumnDef, YuwDatepickerModeDto, YuwDatepickerValue, YuwFieldSizeDto, YuwInputModeDto, YuwInputOtpGroupDto, YuwInputOtpModeDto, YuwInputTypeDto, YuwPaginationRangeItem, YuwPaginationSizeDto, YuwPasswordRevealStateDto, YuwPopoverAlignDto, YuwRadioOptionDto, YuwSearchInputCollapseFromDto, YuwSheetScrollStrategyDto, YuwSheetSideDto, YuwSidebarAvatarDto, YuwSidebarCollapsibleDto, YuwSidebarContentDto, YuwSidebarGroupDto, YuwSidebarItemClickDto, YuwSidebarItemDto, YuwSidebarSideDto, YuwSidebarSubItemDto, YuwSidebarVariantDto, YuwSwitchSizeDto, YuwTabItemDto, YuwTabsActivationModeDto, YuwTabsOrientationDto, YuwTabsVariantDto, YuwTextFieldContract, YuwToasterPositionDto, YuwToasterThemeDto, YuwTooltipPositionDto };
|