@akcelik/strct 1.19.0 → 1.20.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.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
|
@@ -2312,6 +2312,8 @@ declare class StrctInputMask implements ControlValueAccessor {
|
|
|
2312
2312
|
interface StrctOption {
|
|
2313
2313
|
value: unknown;
|
|
2314
2314
|
label: string;
|
|
2315
|
+
/** Grayed out and skipped by keyboard navigation (select). */
|
|
2316
|
+
disabled?: boolean;
|
|
2315
2317
|
}
|
|
2316
2318
|
/**
|
|
2317
2319
|
* Filterable single-select (autocomplete). CVA-compatible, fully keyboard
|
|
@@ -2355,6 +2357,74 @@ declare class StrctCombobox implements ControlValueAccessor {
|
|
|
2355
2357
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctCombobox, "strct-combobox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2356
2358
|
}
|
|
2357
2359
|
|
|
2360
|
+
/**
|
|
2361
|
+
* Select-only combobox (APG pattern): a real button trigger wearing the shared
|
|
2362
|
+
* `.strct-control` look, opening a token-styled listbox — so the option list
|
|
2363
|
+
* matches the theme instead of the OS popup a native `<select>` shows.
|
|
2364
|
+
* CVA-compatible; options are non-filterable (reach for `strct-combobox` when
|
|
2365
|
+
* the list needs typing to narrow).
|
|
2366
|
+
*
|
|
2367
|
+
* <strct-field label="Region">
|
|
2368
|
+
* <strct-select [options]="regions" [(ngModel)]="region" placeholder="Pick a region" />
|
|
2369
|
+
* </strct-field>
|
|
2370
|
+
*
|
|
2371
|
+
* Keyboard follows the native select: ArrowDown/Up and Enter/Space open,
|
|
2372
|
+
* arrows move (skipping disabled options), Home/End jump, typing jumps to the
|
|
2373
|
+
* matching label (typeahead), Enter/Space commit, Escape/Tab close without
|
|
2374
|
+
* committing. The selected option carries a leading ✓ and gets the highlight
|
|
2375
|
+
* when reopening — the same select ergonomics as `strct-dropdown-item
|
|
2376
|
+
* [selected]`.
|
|
2377
|
+
*/
|
|
2378
|
+
declare class StrctSelect implements ControlValueAccessor {
|
|
2379
|
+
private readonly host;
|
|
2380
|
+
protected readonly listId: string;
|
|
2381
|
+
/** Available options (set `disabled: true` on an option to gray it out). */
|
|
2382
|
+
readonly options: _angular_core.InputSignal<StrctOption[]>;
|
|
2383
|
+
/** Muted text shown while no value is selected (localizable). */
|
|
2384
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
2385
|
+
/** Accessible name of the listbox (localizable). */
|
|
2386
|
+
readonly listLabel: _angular_core.InputSignal<string>;
|
|
2387
|
+
/** Text shown when `options` is empty (localizable). */
|
|
2388
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
2389
|
+
/** Static disable flag (forms also drive it via setDisabledState). */
|
|
2390
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2391
|
+
readonly value: _angular_core.WritableSignal<unknown>;
|
|
2392
|
+
readonly open: _angular_core.WritableSignal<boolean>;
|
|
2393
|
+
readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
2394
|
+
readonly isDisabled: _angular_core.WritableSignal<boolean>;
|
|
2395
|
+
protected readonly selectedOption: _angular_core.Signal<StrctOption | undefined>;
|
|
2396
|
+
/** Typeahead buffer — clears half a second after the last keystroke. */
|
|
2397
|
+
private typed;
|
|
2398
|
+
private typedTimer;
|
|
2399
|
+
private onChange;
|
|
2400
|
+
private onTouched;
|
|
2401
|
+
toggle(): void;
|
|
2402
|
+
openList(): void;
|
|
2403
|
+
close(): void;
|
|
2404
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2405
|
+
/**
|
|
2406
|
+
* Native-select typeahead: letters accumulate into a prefix that jumps to
|
|
2407
|
+
* the matching label; repeating one letter cycles its matches instead.
|
|
2408
|
+
*/
|
|
2409
|
+
private typeahead;
|
|
2410
|
+
private move;
|
|
2411
|
+
/** Jump to `index`, walking `dir` past disabled options. */
|
|
2412
|
+
private moveTo;
|
|
2413
|
+
protected pick(opt: StrctOption, event: Event): void;
|
|
2414
|
+
private commit;
|
|
2415
|
+
protected onBlur(): void;
|
|
2416
|
+
/** Highlight starts on the selected option — or the first enabled one. */
|
|
2417
|
+
private initialIndex;
|
|
2418
|
+
private scrollActiveIntoView;
|
|
2419
|
+
protected onDocClick(event: MouseEvent): void;
|
|
2420
|
+
writeValue(value: unknown): void;
|
|
2421
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
2422
|
+
registerOnTouched(fn: () => void): void;
|
|
2423
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2424
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSelect, never>;
|
|
2425
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSelect, "strct-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "listLabel": { "alias": "listLabel"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2358
2428
|
interface DayCell {
|
|
2359
2429
|
day: number;
|
|
2360
2430
|
iso: string;
|
|
@@ -4445,5 +4515,5 @@ declare class StrctReorderItem {
|
|
|
4445
4515
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctReorderItem, "[strctReorderItem]", never, {}, {}, never, never, true, never>;
|
|
4446
4516
|
}
|
|
4447
4517
|
|
|
4448
|
-
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, strctComputeDiff, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone };
|
|
4518
|
+
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, strctComputeDiff, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone };
|
|
4449
4519
|
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridFilters, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDiffRow, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFilterChip, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctHotkey, StrctIconBadge, StrctIconName, StrctKnobStatus, StrctLogLine, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMenubarItem, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctReorderEvent, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimeRange, StrctTimeRangePreset, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTourStep, StrctTransferItem, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus, StrctWizardDefaults };
|