@akcelik/strct 6.2.0 → 6.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 +168 -77
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_tokens.scss +30 -0
- package/types/akcelik-strct.d.ts +42 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.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
|
@@ -104,6 +104,11 @@
|
|
|
104
104
|
--control-h-md: 32px;
|
|
105
105
|
--control-h-lg: 38px;
|
|
106
106
|
--control-h: var(--control-h-md);
|
|
107
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
108
|
+
--icon-size-sm: 14px;
|
|
109
|
+
--icon-size-md: 16px;
|
|
110
|
+
--icon-size-lg: 18px;
|
|
111
|
+
--icon-size: var(--icon-size-md);
|
|
107
112
|
--radius-sm: 2px;
|
|
108
113
|
--radius-md: 3px;
|
|
109
114
|
--radius-lg: 4px;
|
|
@@ -174,6 +179,11 @@
|
|
|
174
179
|
--control-h-md: 32px;
|
|
175
180
|
--control-h-lg: 38px;
|
|
176
181
|
--control-h: var(--control-h-md);
|
|
182
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
183
|
+
--icon-size-sm: 14px;
|
|
184
|
+
--icon-size-md: 16px;
|
|
185
|
+
--icon-size-lg: 18px;
|
|
186
|
+
--icon-size: var(--icon-size-md);
|
|
177
187
|
--radius-sm: 2px;
|
|
178
188
|
--radius-md: 3px;
|
|
179
189
|
--radius-lg: 4px;
|
|
@@ -244,6 +254,11 @@
|
|
|
244
254
|
--control-h-md: 32px;
|
|
245
255
|
--control-h-lg: 38px;
|
|
246
256
|
--control-h: var(--control-h-md);
|
|
257
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
258
|
+
--icon-size-sm: 14px;
|
|
259
|
+
--icon-size-md: 16px;
|
|
260
|
+
--icon-size-lg: 18px;
|
|
261
|
+
--icon-size: var(--icon-size-md);
|
|
247
262
|
--radius-sm: 2px;
|
|
248
263
|
--radius-md: 3px;
|
|
249
264
|
--radius-lg: 4px;
|
|
@@ -314,6 +329,11 @@
|
|
|
314
329
|
--control-h-md: 32px;
|
|
315
330
|
--control-h-lg: 38px;
|
|
316
331
|
--control-h: var(--control-h-md);
|
|
332
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
333
|
+
--icon-size-sm: 14px;
|
|
334
|
+
--icon-size-md: 16px;
|
|
335
|
+
--icon-size-lg: 18px;
|
|
336
|
+
--icon-size: var(--icon-size-md);
|
|
317
337
|
--radius-sm: 2px;
|
|
318
338
|
--radius-md: 3px;
|
|
319
339
|
--radius-lg: 4px;
|
|
@@ -384,6 +404,11 @@
|
|
|
384
404
|
--control-h-md: 32px;
|
|
385
405
|
--control-h-lg: 38px;
|
|
386
406
|
--control-h: var(--control-h-md);
|
|
407
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
408
|
+
--icon-size-sm: 14px;
|
|
409
|
+
--icon-size-md: 16px;
|
|
410
|
+
--icon-size-lg: 18px;
|
|
411
|
+
--icon-size: var(--icon-size-md);
|
|
387
412
|
--radius-sm: 2px;
|
|
388
413
|
--radius-md: 3px;
|
|
389
414
|
--radius-lg: 4px;
|
|
@@ -454,6 +479,11 @@
|
|
|
454
479
|
--control-h-md: 32px;
|
|
455
480
|
--control-h-lg: 38px;
|
|
456
481
|
--control-h: var(--control-h-md);
|
|
482
|
+
/* The icon that sits in a control of that size (see icon.ts). */
|
|
483
|
+
--icon-size-sm: 14px;
|
|
484
|
+
--icon-size-md: 16px;
|
|
485
|
+
--icon-size-lg: 18px;
|
|
486
|
+
--icon-size: var(--icon-size-md);
|
|
457
487
|
--radius-sm: 2px;
|
|
458
488
|
--radius-md: 3px;
|
|
459
489
|
--radius-lg: 4px;
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -108,6 +108,12 @@ export interface StrctThresholds {
|
|
|
108
108
|
export type StrctControlSize = 'sm' | 'md' | 'lg';
|
|
109
109
|
/** The custom property a size sets, for a host binding. */
|
|
110
110
|
export declare function strctControlHeight(size: StrctControlSize): string;
|
|
111
|
+
/**
|
|
112
|
+
* The icon size that goes with a control size — 14px at sm, 16px at md, 18px
|
|
113
|
+
* at lg. A control sets this beside its height so an icon inside it needs no
|
|
114
|
+
* size of its own; an icon that states one still wins (FR-64-01).
|
|
115
|
+
*/
|
|
116
|
+
export declare function strctIconSize(size: StrctControlSize): string;
|
|
111
117
|
/**
|
|
112
118
|
* Sets the control size for everything inside it.
|
|
113
119
|
*
|
|
@@ -126,6 +132,7 @@ export declare class StrctControlSizeDirective {
|
|
|
126
132
|
/** The size for the controls inside. */
|
|
127
133
|
readonly strctControlSize: import("@angular/core").InputSignal<StrctControlSize>;
|
|
128
134
|
protected readonly height: import("@angular/core").Signal<string>;
|
|
135
|
+
protected readonly iconSize: import("@angular/core").Signal<string>;
|
|
129
136
|
static ɵfac: i0.ɵɵFactoryDeclaration<StrctControlSizeDirective, never>;
|
|
130
137
|
static ɵdir: i0.ɵɵDirectiveDeclaration<StrctControlSizeDirective, "[strctControlSize]", never, {
|
|
131
138
|
"strctControlSize": {
|
|
@@ -414,8 +421,17 @@ export declare class StrctIcon {
|
|
|
414
421
|
* are set. Use `name` for runtime-registered custom icons.
|
|
415
422
|
*/
|
|
416
423
|
readonly strictName: import("@angular/core").InputSignal<StrctIconName | null>;
|
|
417
|
-
/**
|
|
418
|
-
|
|
424
|
+
/**
|
|
425
|
+
* Icon size in pixels.
|
|
426
|
+
*
|
|
427
|
+
* Left unset, the icon is the size its surroundings ask for: a control
|
|
428
|
+
* sets `--icon-size` beside its `--control-h`, so an icon in a small
|
|
429
|
+
* button is 14px and the same icon in a large one is 18px without either
|
|
430
|
+
* call site saying so. With no control around it the icon is 16px, as it
|
|
431
|
+
* always was. Setting this still wins — it writes the same property on the
|
|
432
|
+
* icon itself, which is nearer than anything enclosing it (FR-64-01).
|
|
433
|
+
*/
|
|
434
|
+
readonly size: import("@angular/core").InputSignal<number | undefined>;
|
|
419
435
|
/** Stroke width for outline icons. */
|
|
420
436
|
readonly strokeWidth: import("@angular/core").InputSignal<number>;
|
|
421
437
|
/** Optional status dot overlaid on the glyph (object state). */
|
|
@@ -447,7 +463,6 @@ export declare class StrctIcon {
|
|
|
447
463
|
/** The badge's text, or null when there is nothing to say. */
|
|
448
464
|
protected readonly countText: import("@angular/core").Signal<string | null>;
|
|
449
465
|
/** 1.2em of the icon size, floored at 14px, as the badge's box. */
|
|
450
|
-
protected readonly countFontSize: import("@angular/core").Signal<number>;
|
|
451
466
|
/** The mode as drawn. */
|
|
452
467
|
readonly shownMode: import("@angular/core").Signal<StrctIconMode>;
|
|
453
468
|
/** The badge as drawn. */
|
|
@@ -4220,6 +4235,8 @@ export declare class StrctSearchbox implements ControlValueAccessor {
|
|
|
4220
4235
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
4221
4236
|
/** The height its size asks for; nothing while it states no size. */
|
|
4222
4237
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
4238
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
4239
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
4223
4240
|
private readonly host;
|
|
4224
4241
|
/** Placeholder text (and the trigger mode's label). */
|
|
4225
4242
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
@@ -4874,6 +4891,8 @@ export declare class StrctInput {
|
|
|
4874
4891
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
4875
4892
|
/** The height its size asks for; nothing while it states no size. */
|
|
4876
4893
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
4894
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
4895
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
4877
4896
|
/** Monospace text with tabular figures — a PEM block, an id, a mapping. */
|
|
4878
4897
|
readonly mono: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
4879
4898
|
static ɵfac: i0.ɵɵFactoryDeclaration<StrctInput, never>;
|
|
@@ -5283,6 +5302,8 @@ export declare class StrctPassword implements ControlValueAccessor {
|
|
|
5283
5302
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
5284
5303
|
/** The height its size asks for; nothing while it states no size. */
|
|
5285
5304
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
5305
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
5306
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
5286
5307
|
/** Placeholder text when empty. */
|
|
5287
5308
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
5288
5309
|
/** Show a strength meter. */
|
|
@@ -5726,6 +5747,8 @@ export declare class StrctInputMask implements ControlValueAccessor {
|
|
|
5726
5747
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
5727
5748
|
/** The height its size asks for; nothing while it states no size. */
|
|
5728
5749
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
5750
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
5751
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
5729
5752
|
/** Mask pattern (9=digit, A=letter, H=hex, *=alnum). */
|
|
5730
5753
|
readonly mask: import("@angular/core").InputSignal<string>;
|
|
5731
5754
|
/** Placeholder text when empty. */
|
|
@@ -5815,6 +5838,8 @@ export declare class StrctCombobox implements ControlValueAccessor {
|
|
|
5815
5838
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
5816
5839
|
/** The height its size asks for; nothing while it states no size. */
|
|
5817
5840
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
5841
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
5842
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
5818
5843
|
private readonly host;
|
|
5819
5844
|
private readonly inputEl;
|
|
5820
5845
|
protected readonly listId: string;
|
|
@@ -6011,6 +6036,8 @@ export declare class StrctSelect implements ControlValueAccessor {
|
|
|
6011
6036
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
6012
6037
|
/** The height its size asks for; nothing while it states no size. */
|
|
6013
6038
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
6039
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
6040
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
6014
6041
|
private readonly host;
|
|
6015
6042
|
protected readonly listId: string;
|
|
6016
6043
|
/** Available options (set `disabled: true` on an option to gray it out). */
|
|
@@ -6138,6 +6165,8 @@ export declare class StrctDatepicker implements ControlValueAccessor {
|
|
|
6138
6165
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
6139
6166
|
/** The height its size asks for; nothing while it states no size. */
|
|
6140
6167
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
6168
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
6169
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
6141
6170
|
private readonly host;
|
|
6142
6171
|
/** Placeholder text when empty. */
|
|
6143
6172
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
@@ -6256,6 +6285,8 @@ export declare class StrctColorPicker implements ControlValueAccessor {
|
|
|
6256
6285
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
6257
6286
|
/** The height its size asks for; nothing while it states no size. */
|
|
6258
6287
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
6288
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
6289
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
6259
6290
|
private readonly host;
|
|
6260
6291
|
/** Custom palette swatches. */
|
|
6261
6292
|
readonly swatches: import("@angular/core").InputSignal<string[]>;
|
|
@@ -6388,6 +6419,8 @@ export declare class StrctCascadeSelect extends StrctCascadeHost implements Cont
|
|
|
6388
6419
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
6389
6420
|
/** The height its size asks for; nothing while it states no size. */
|
|
6390
6421
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
6422
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
6423
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
6391
6424
|
private readonly elementRef;
|
|
6392
6425
|
/** Available options. */
|
|
6393
6426
|
readonly options: import("@angular/core").InputSignal<StrctCascadeOption[]>;
|
|
@@ -12203,6 +12236,8 @@ export declare class StrctNumber implements ControlValueAccessor {
|
|
|
12203
12236
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
12204
12237
|
/** The height its size asks for; nothing while it states no size. */
|
|
12205
12238
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
12239
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
12240
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
12206
12241
|
/** Minimum allowed value; null = unbounded. */
|
|
12207
12242
|
readonly min: import("@angular/core").InputSignal<number | null>;
|
|
12208
12243
|
/** Maximum allowed value; null = unbounded. */
|
|
@@ -12484,6 +12519,8 @@ export declare class StrctTreeSelect implements ControlValueAccessor {
|
|
|
12484
12519
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
12485
12520
|
/** The height its size asks for; nothing while it states no size. */
|
|
12486
12521
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
12522
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
12523
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
12487
12524
|
private readonly host;
|
|
12488
12525
|
/** Root nodes rendered by the embedded `<strct-tree>` (data-driven mode). */
|
|
12489
12526
|
readonly nodes: import("@angular/core").InputSignal<StrctTreeNodeData[]>;
|
|
@@ -12603,6 +12640,8 @@ export declare class StrctDatetimePicker implements ControlValueAccessor {
|
|
|
12603
12640
|
readonly size: import("@angular/core").InputSignal<StrctControlSize | undefined>;
|
|
12604
12641
|
/** The height its size asks for; nothing while it states no size. */
|
|
12605
12642
|
protected readonly controlHeight: import("@angular/core").Signal<string | null>;
|
|
12643
|
+
/** And the icon size that goes with it, for the icons it holds. */
|
|
12644
|
+
protected readonly controlIconSize: import("@angular/core").Signal<string | null>;
|
|
12606
12645
|
/** Placeholder text of the date input when empty (localizable). */
|
|
12607
12646
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
12608
12647
|
/** Minute granularity of the minute select (1 = every minute). */
|