@akcelik/strct 0.2.0 → 0.3.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/README.md +11 -1
- package/fesm2022/akcelik-strct.mjs +188 -17
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_fonts.scss +49 -0
- package/styles/fonts/dm-sans-400.woff2 +0 -0
- package/styles/fonts/dm-sans-500.woff2 +0 -0
- package/styles/fonts/dm-sans-600.woff2 +0 -0
- package/styles/fonts/dm-sans-700.woff2 +0 -0
- package/styles/fonts/jetbrains-mono-400.woff2 +0 -0
- package/styles/fonts/jetbrains-mono-500.woff2 +0 -0
- package/styles/theme.scss +1 -0
- package/types/akcelik-strct.d.ts +39 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Self-hosted fonts bundled with the library so it renders in its intended
|
|
2
|
+
// typography without any external request. Both are OFL-licensed:
|
|
3
|
+
// DM Sans — https://fonts.google.com/specimen/DM+Sans (OFL)
|
|
4
|
+
// JetBrains Mono — https://www.jetbrains.com/lp/mono/ (OFL)
|
|
5
|
+
// Imported by theme.scss; the woff2 files ship under `styles/fonts/`.
|
|
6
|
+
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: 'DM Sans';
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
font-display: swap;
|
|
12
|
+
src: url('./fonts/dm-sans-400.woff2') format('woff2');
|
|
13
|
+
}
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: 'DM Sans';
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
src: url('./fonts/dm-sans-500.woff2') format('woff2');
|
|
20
|
+
}
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: 'DM Sans';
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
src: url('./fonts/dm-sans-600.woff2') format('woff2');
|
|
27
|
+
}
|
|
28
|
+
@font-face {
|
|
29
|
+
font-family: 'DM Sans';
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
src: url('./fonts/dm-sans-700.woff2') format('woff2');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@font-face {
|
|
37
|
+
font-family: 'JetBrains Mono';
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
src: url('./fonts/jetbrains-mono-400.woff2') format('woff2');
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'JetBrains Mono';
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
src: url('./fonts/jetbrains-mono-500.woff2') format('woff2');
|
|
49
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/styles/theme.scss
CHANGED
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -454,6 +454,8 @@ declare class StrctModal {
|
|
|
454
454
|
protected readonly titleId: string;
|
|
455
455
|
/** Element that had focus before the dialog opened, restored on close. */
|
|
456
456
|
private previousActive;
|
|
457
|
+
/** Whether this instance currently holds a scroll lock. */
|
|
458
|
+
private locked;
|
|
457
459
|
constructor();
|
|
458
460
|
close(): void;
|
|
459
461
|
protected onBackdrop(): void;
|
|
@@ -527,19 +529,24 @@ declare class StrctContextMenu {
|
|
|
527
529
|
}
|
|
528
530
|
|
|
529
531
|
/**
|
|
530
|
-
* A nested fly-out inside a `strct-context-menu` or `strct-dropdown`.
|
|
531
|
-
*
|
|
532
|
+
* A nested fly-out inside a `strct-context-menu` or `strct-dropdown`. Opens on
|
|
533
|
+
* hover, click/tap, or the keyboard (Enter / Space / →), and flips to the left
|
|
534
|
+
* near the right edge of the viewport. Reuse `strct-dropdown-item` for entries.
|
|
532
535
|
* <strct-submenu label="Power">
|
|
533
536
|
* <strct-dropdown-item>Power on</strct-dropdown-item>
|
|
534
537
|
* <strct-dropdown-item>Power off</strct-dropdown-item>
|
|
535
538
|
* </strct-submenu>
|
|
536
539
|
*/
|
|
537
540
|
declare class StrctSubmenu {
|
|
541
|
+
private readonly host;
|
|
538
542
|
readonly label: _angular_core.InputSignal<string>;
|
|
539
543
|
/** Optional leading icon; when omitted the icon column is still reserved so
|
|
540
544
|
* the label stays aligned with sibling items that do have icons. */
|
|
541
545
|
readonly icon: _angular_core.InputSignal<string>;
|
|
542
546
|
readonly open: _angular_core.WritableSignal<boolean>;
|
|
547
|
+
/** Open to the left when the fly-out would overflow the right edge. */
|
|
548
|
+
protected readonly flip: _angular_core.WritableSignal<boolean>;
|
|
549
|
+
protected setOpen(value: boolean): void;
|
|
543
550
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctSubmenu, never>;
|
|
544
551
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctSubmenu, "strct-submenu", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, ["[strctSubmenuLabel]", "*"], true, never>;
|
|
545
552
|
}
|
|
@@ -697,6 +704,35 @@ declare class StrctPagination {
|
|
|
697
704
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctPagination, "strct-pagination", never, { "total": { "alias": "total"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; }, never, never, true, never>;
|
|
698
705
|
}
|
|
699
706
|
|
|
707
|
+
/**
|
|
708
|
+
* Form-field wrapper: a label (with optional required marker), the projected
|
|
709
|
+
* control, and a hint or error message. It auto-links the control via
|
|
710
|
+
* `aria-describedby` and sets `aria-invalid` when an error is present.
|
|
711
|
+
*
|
|
712
|
+
* <strct-field label="Email" required hint="We never share it." [error]="emailError()">
|
|
713
|
+
* <input strctInput type="email" [(ngModel)]="email" />
|
|
714
|
+
* </strct-field>
|
|
715
|
+
*/
|
|
716
|
+
declare class StrctField {
|
|
717
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
718
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
719
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
720
|
+
/** Error message (string or first-of array); falsy clears the error state. */
|
|
721
|
+
readonly error: _angular_core.InputSignal<string | string[] | null | undefined>;
|
|
722
|
+
private readonly host;
|
|
723
|
+
private readonly n;
|
|
724
|
+
protected readonly hintId: string;
|
|
725
|
+
protected readonly errorId: string;
|
|
726
|
+
protected readonly controlId: _angular_core.WritableSignal<string>;
|
|
727
|
+
protected readonly errorText: _angular_core.Signal<string>;
|
|
728
|
+
constructor();
|
|
729
|
+
private control;
|
|
730
|
+
private link;
|
|
731
|
+
private applyAria;
|
|
732
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctField, never>;
|
|
733
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctField, "strct-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
734
|
+
}
|
|
735
|
+
|
|
700
736
|
/**
|
|
701
737
|
* Applies the shared `.strct-control` look to a native input / textarea / select.
|
|
702
738
|
* <input strctInput placeholder="Name" />
|
|
@@ -1546,5 +1582,5 @@ declare class StrctToastOutlet {
|
|
|
1546
1582
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctToastOutlet, "strct-toast-outlet", never, {}, {}, never, never, true, never>;
|
|
1547
1583
|
}
|
|
1548
1584
|
|
|
1549
|
-
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRange, StrctRating, StrctRowDetailDef, StrctShell, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon };
|
|
1585
|
+
export { STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_MASKS, STRCT_PALETTES, STRCT_RAW_ICONS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCascadeHost, StrctCascadeNode, StrctCascadeSelect, StrctCellDef, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDivider, StrctDonut, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctField, StrctFile, StrctFooter, StrctGauge, StrctHeader, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKnob, StrctLogin, StrctMenuPanel, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRange, StrctRating, StrctRowDetailDef, StrctShell, StrctSignpost, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctStack, StrctStackItem, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctThemeService, StrctThemeSwitcher, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctTooltip, StrctTree, StrctTreeNode, StrctVerticalNav, StrctWizard, registerStrctIcon };
|
|
1550
1586
|
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartStatus, StrctChartType, StrctColumn, StrctDatagridColumn, StrctDonutSegment, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRow, StrctRowId, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctTagStatus, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeNodeData };
|