@akcelik/strct 1.18.0 → 1.19.0
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/akcelik-strct.mjs +133 -32
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +25 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
|
|
5
5
|
"author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -1231,10 +1231,23 @@ declare class StrctDropdown {
|
|
|
1231
1231
|
readonly popoverLabel: _angular_core.InputSignal<string>;
|
|
1232
1232
|
readonly open: _angular_core.WritableSignal<boolean>;
|
|
1233
1233
|
constructor();
|
|
1234
|
+
/** Where focus was when the menu opened — restored on Escape/selection. */
|
|
1235
|
+
private lastFocused;
|
|
1234
1236
|
toggle(): void;
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1237
|
+
/** Open (if closed) and move focus into the menu — ArrowDown on the trigger. */
|
|
1238
|
+
openMenu(): void;
|
|
1239
|
+
close(restoreFocus?: boolean): void;
|
|
1240
|
+
/**
|
|
1241
|
+
* Menu mode closes ONLY on a real item activation — a click that lands on
|
|
1242
|
+
* the menu's padding or a divider (a 2px miss) keeps it open instead of
|
|
1243
|
+
* throwing the whole interaction away. Popover form controls never close.
|
|
1244
|
+
*/
|
|
1245
|
+
protected onInnerActivate(event: Event): void;
|
|
1246
|
+
/** APG menu keyboarding: arrows rove, Home/End jump, Enter/Space activate. */
|
|
1247
|
+
protected onMenuKeydown(event: KeyboardEvent): void;
|
|
1248
|
+
private enabledItems;
|
|
1249
|
+
/** Focus the selected item if there is one, else the first — after render. */
|
|
1250
|
+
private focusInitialItem;
|
|
1238
1251
|
protected onDocClick(event: MouseEvent): void;
|
|
1239
1252
|
protected onEscape(): void;
|
|
1240
1253
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDropdown, never>;
|
|
@@ -1247,17 +1260,25 @@ declare class StrctDropdown {
|
|
|
1247
1260
|
*/
|
|
1248
1261
|
declare class StrctDropdownTrigger {
|
|
1249
1262
|
protected readonly dd: StrctDropdown | null;
|
|
1263
|
+
protected onArrowDown(event: Event): void;
|
|
1250
1264
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDropdownTrigger, never>;
|
|
1251
1265
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctDropdownTrigger, "[strctDropdownTrigger]", never, {}, {}, never, never, true, never>;
|
|
1252
1266
|
}
|
|
1253
1267
|
/** A selectable row inside a `<strct-dropdown>`. */
|
|
1254
1268
|
declare class StrctDropdownItem {
|
|
1269
|
+
/**
|
|
1270
|
+
* Select-like usage: bind `selected` and the item becomes a
|
|
1271
|
+
* `menuitemradio` with `aria-checked`, a leading ✓ on the current choice
|
|
1272
|
+
* and an aligned lead slot — so reopening the menu shows what is chosen.
|
|
1273
|
+
* Leave unbound for plain action items.
|
|
1274
|
+
*/
|
|
1275
|
+
readonly selected: _angular_core.InputSignal<boolean | null>;
|
|
1255
1276
|
/** Danger. */
|
|
1256
1277
|
readonly critical: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1257
1278
|
/** Static disable flag. */
|
|
1258
1279
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1259
1280
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDropdownItem, never>;
|
|
1260
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDropdownItem, "strct-dropdown-item", never, { "critical": { "alias": "critical"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1281
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDropdownItem, "strct-dropdown-item", never, { "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "critical": { "alias": "critical"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1261
1282
|
}
|
|
1262
1283
|
/** Thin separator between groups of menu items. */
|
|
1263
1284
|
declare class StrctDropdownDivider {
|