@akcelik/strct 1.2.0 → 1.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/fesm2022/akcelik-strct.mjs +90 -12
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_tokens.scss +66 -0
- package/types/akcelik-strct.d.ts +33 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.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",
|
package/styles/_tokens.scss
CHANGED
|
@@ -18,6 +18,17 @@
|
|
|
18
18
|
--font: 'DM Sans', -apple-system, system-ui, sans-serif;
|
|
19
19
|
--mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
|
|
20
20
|
--bg-0: #0e1015;
|
|
21
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
22
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
23
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
24
|
+
--chart-1: #3987e5;
|
|
25
|
+
--chart-2: #008300;
|
|
26
|
+
--chart-3: #d55181;
|
|
27
|
+
--chart-4: #c98500;
|
|
28
|
+
--chart-5: #199e70;
|
|
29
|
+
--chart-6: #d95926;
|
|
30
|
+
--chart-7: #9085e9;
|
|
31
|
+
--chart-8: #e66767;
|
|
21
32
|
--bg-1: #161920;
|
|
22
33
|
--bg-2: #1c2028;
|
|
23
34
|
--bg-3: #23282f;
|
|
@@ -77,6 +88,17 @@
|
|
|
77
88
|
|
|
78
89
|
[data-palette='arctic'][data-theme='light'] {
|
|
79
90
|
--bg-0: #f3f4f6;
|
|
91
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
92
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
93
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
94
|
+
--chart-1: #2a78d6;
|
|
95
|
+
--chart-2: #008300;
|
|
96
|
+
--chart-3: #e87ba4;
|
|
97
|
+
--chart-4: #eda100;
|
|
98
|
+
--chart-5: #1baf7a;
|
|
99
|
+
--chart-6: #eb6834;
|
|
100
|
+
--chart-7: #4a3aa7;
|
|
101
|
+
--chart-8: #e34948;
|
|
80
102
|
--bg-1: #fbfcfd;
|
|
81
103
|
--bg-2: #f8f9fb;
|
|
82
104
|
--bg-3: #eef0f3;
|
|
@@ -136,6 +158,17 @@
|
|
|
136
158
|
|
|
137
159
|
[data-palette='ember'][data-theme='dark'] {
|
|
138
160
|
--bg-0: #12100d;
|
|
161
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
162
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
163
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
164
|
+
--chart-1: #c98500;
|
|
165
|
+
--chart-2: #d55181;
|
|
166
|
+
--chart-3: #008300;
|
|
167
|
+
--chart-4: #3987e5;
|
|
168
|
+
--chart-5: #199e70;
|
|
169
|
+
--chart-6: #d95926;
|
|
170
|
+
--chart-7: #9085e9;
|
|
171
|
+
--chart-8: #e66767;
|
|
139
172
|
--bg-1: #1a1714;
|
|
140
173
|
--bg-2: #211e1a;
|
|
141
174
|
--bg-3: #2a2621;
|
|
@@ -195,6 +228,17 @@
|
|
|
195
228
|
|
|
196
229
|
[data-palette='ember'][data-theme='light'] {
|
|
197
230
|
--bg-0: #f5f2ee;
|
|
231
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
232
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
233
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
234
|
+
--chart-1: #eda100;
|
|
235
|
+
--chart-2: #e87ba4;
|
|
236
|
+
--chart-3: #008300;
|
|
237
|
+
--chart-4: #2a78d6;
|
|
238
|
+
--chart-5: #1baf7a;
|
|
239
|
+
--chart-6: #eb6834;
|
|
240
|
+
--chart-7: #4a3aa7;
|
|
241
|
+
--chart-8: #e34948;
|
|
198
242
|
--bg-1: #fdfcfa;
|
|
199
243
|
--bg-2: #f9f7f4;
|
|
200
244
|
--bg-3: #f0ece7;
|
|
@@ -254,6 +298,17 @@
|
|
|
254
298
|
|
|
255
299
|
[data-palette='sage'][data-theme='dark'] {
|
|
256
300
|
--bg-0: #0d1210;
|
|
301
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
302
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
303
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
304
|
+
--chart-1: #008300;
|
|
305
|
+
--chart-2: #3987e5;
|
|
306
|
+
--chart-3: #d55181;
|
|
307
|
+
--chart-4: #c98500;
|
|
308
|
+
--chart-5: #199e70;
|
|
309
|
+
--chart-6: #d95926;
|
|
310
|
+
--chart-7: #9085e9;
|
|
311
|
+
--chart-8: #e66767;
|
|
257
312
|
--bg-1: #141a17;
|
|
258
313
|
--bg-2: #1a211e;
|
|
259
314
|
--bg-3: #222a26;
|
|
@@ -313,6 +368,17 @@
|
|
|
313
368
|
|
|
314
369
|
[data-palette='sage'][data-theme='light'] {
|
|
315
370
|
--bg-0: #f2f5f3;
|
|
371
|
+
/* Categorical data palette (FR-CHART-15): fixed slot order per palette
|
|
372
|
+
(the CVD-safety mechanism), slot 1 tracks the accent hue at data-grade
|
|
373
|
+
chroma. Validator-passed per surface — see docs/chart-palette.md. */
|
|
374
|
+
--chart-1: #008300;
|
|
375
|
+
--chart-2: #2a78d6;
|
|
376
|
+
--chart-3: #e87ba4;
|
|
377
|
+
--chart-4: #eda100;
|
|
378
|
+
--chart-5: #1baf7a;
|
|
379
|
+
--chart-6: #eb6834;
|
|
380
|
+
--chart-7: #4a3aa7;
|
|
381
|
+
--chart-8: #e34948;
|
|
316
382
|
--bg-1: #fafcfb;
|
|
317
383
|
--bg-2: #f5f8f6;
|
|
318
384
|
--bg-3: #eaf0ec;
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -2414,13 +2414,30 @@ declare class StrctSparkline {
|
|
|
2414
2414
|
type StrctChartType = 'line' | 'area' | 'bar';
|
|
2415
2415
|
/** Line interpolation between points. */
|
|
2416
2416
|
type StrctChartCurve = 'smooth' | 'linear' | 'step';
|
|
2417
|
+
/**
|
|
2418
|
+
* A categorical palette slot: theme tokens `--chart-1..8` (FR-CHART-15).
|
|
2419
|
+
* Fixed slot order per palette is the CVD-safety mechanism; slot 1 tracks the
|
|
2420
|
+
* theme's accent hue at data-grade chroma. Use for N *distinct entities*
|
|
2421
|
+
* (per-node CPU, per-datastore latency) — the four semantic statuses stay
|
|
2422
|
+
* reserved for health/threshold meaning.
|
|
2423
|
+
*/
|
|
2424
|
+
type StrctChartSlot = 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5' | 'chart-6' | 'chart-7' | 'chart-8';
|
|
2425
|
+
/** A series color role: a semantic status, or a categorical palette slot. */
|
|
2426
|
+
type StrctChartColor = StrctChartStatus | StrctChartSlot;
|
|
2417
2427
|
/** One series in a multi-series chart. */
|
|
2418
2428
|
interface StrctChartSeries {
|
|
2419
2429
|
/** Values; `null` (or `NaN`) marks a data gap — the line breaks, no interpolation. */
|
|
2420
2430
|
data: (number | null)[];
|
|
2421
2431
|
/** Legend + tooltip name. */
|
|
2422
2432
|
label?: string;
|
|
2423
|
-
/**
|
|
2433
|
+
/**
|
|
2434
|
+
* Color role: a semantic status *or* a categorical slot `'chart-1'..'chart-8'`
|
|
2435
|
+
* (theme tokens, validator-passed per palette × mode). Takes precedence over
|
|
2436
|
+
* `status`; two-directional pairs (in/out, read/write) should instead share
|
|
2437
|
+
* one hue and differ by `dash`.
|
|
2438
|
+
*/
|
|
2439
|
+
color?: StrctChartColor;
|
|
2440
|
+
/** Per-series semantic color; falls back to the chart's `status`. */
|
|
2424
2441
|
status?: StrctChartStatus;
|
|
2425
2442
|
/** Per-series area fill. */
|
|
2426
2443
|
area?: boolean;
|
|
@@ -2680,6 +2697,20 @@ declare class StrctChart {
|
|
|
2680
2697
|
i: number;
|
|
2681
2698
|
}[]>;
|
|
2682
2699
|
protected readonly hoverX: _angular_core.Signal<number | null>;
|
|
2700
|
+
/**
|
|
2701
|
+
* Tooltip edge-flip (FR-CHART-14): near the left edge the balloon
|
|
2702
|
+
* left-aligns, near the right edge it right-aligns, otherwise it stays
|
|
2703
|
+
* centered — so the first/last point's values are never clipped by an
|
|
2704
|
+
* `overflow: hidden` ancestor. Only the balloon shifts; the crosshair
|
|
2705
|
+
* stays on the true point-X.
|
|
2706
|
+
*/
|
|
2707
|
+
private readonly tipAlign;
|
|
2708
|
+
/** Horizontal-only shift (multi / gap tips, anchored below the plot top). */
|
|
2709
|
+
protected readonly tipShift: _angular_core.Signal<"translate(8px, 0)" | "translate(calc(-100% - 8px), 0)" | "translate(-50%, 0)">;
|
|
2710
|
+
/** Shift incl. the single tip's vertical lift above the hover point. */
|
|
2711
|
+
protected readonly tipShiftRaised: _angular_core.Signal<"translate(8px, calc(-100% - 10px))" | "translate(calc(-100% - 8px), calc(-100% - 10px))" | "translate(-50%, calc(-100% - 10px))">;
|
|
2712
|
+
/** Keep the y-axis value chip vertically inside the plot box. */
|
|
2713
|
+
protected axisChipY(y: number): number;
|
|
2683
2714
|
protected readonly hoverPt: _angular_core.Signal<Pt | null>;
|
|
2684
2715
|
protected readonly hoverValue: _angular_core.Signal<number | "">;
|
|
2685
2716
|
/** The hovered slot exists but holds a gap (single-series). */
|
|
@@ -3110,4 +3141,4 @@ declare class StrctEmptyState {
|
|
|
3110
3141
|
}
|
|
3111
3142
|
|
|
3112
3143
|
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, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctContextMenu, StrctContextMenuTrigger, StrctDatagrid, StrctDatagridActionBar, StrctDatepicker, StrctDesc, StrctDescriptionList, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctEmptyState, StrctField, StrctFile, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHero, StrctIcon, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMetricTile, StrctModal, StrctNav, StrctNavItem, StrctOverlay, StrctPagination, StrctPassword, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRating, StrctRowDetailDef, StrctSectionMenu, StrctSegmented, StrctShell, StrctShellService, 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, strctValidationIcon, strctValidationTone };
|
|
3113
|
-
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartCurve, StrctChartSeries, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus };
|
|
3144
|
+
export type { StrctAlertType, StrctAvatarSize, StrctAvatarStatus, StrctBadgeStatus, StrctButtonSize, StrctButtonVariant, StrctCascadeOption, StrctCellContext, StrctChartAnnotation, StrctChartColor, StrctChartCurve, StrctChartSeries, StrctChartSlot, StrctChartStatus, StrctChartThreshold, StrctChartType, StrctColumn, StrctCommandItem, StrctDatagridColumn, StrctDatagridColumnState, StrctDatagridLabels, StrctDatagridLazyState, StrctDescAlign, StrctDescItem, StrctDonutSegment, StrctDrawerSide, StrctDrawerSize, StrctEmptyVariant, StrctFlowDirection, StrctFlowNode, StrctFlowOrientation, StrctIconBadge, StrctKnobStatus, StrctMenuItem, StrctMenuLink, StrctMenuOpenOptions, StrctMenuSection, StrctMetricStatus, StrctModalSize, StrctMode, StrctOption, StrctOverlayPlacement, StrctPalette, StrctPaletteInfo, StrctProgressStatus, StrctRailItem, StrctRailStatus, StrctRow, StrctRowId, StrctSegmentedOption, StrctSegmentedSize, StrctSignpostPosition, StrctSpeedDialDirection, StrctSpinnerSize, StrctStatus, StrctTagStatus, StrctThresholds, StrctTimelineState, StrctToast, StrctToastOptions, StrctToastType, StrctTooltipPosition, StrctTreeMenuEvent, StrctTreeNodeData, StrctTreeNodeMenuFn, StrctValidationState, StrctValidationStatus };
|