@akcelik/strct 5.0.1 → 5.0.2
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 +120 -15
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_base.scss +37 -0
- package/types/akcelik-strct.d.ts +19 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
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/_base.scss
CHANGED
|
@@ -170,3 +170,40 @@ kbd,
|
|
|
170
170
|
outline: 2px solid var(--acc50);
|
|
171
171
|
outline-offset: -1px;
|
|
172
172
|
}
|
|
173
|
+
|
|
174
|
+
// Drag states for `[strctReorderItem]`. The classes were bound from the start
|
|
175
|
+
// and nothing drew them, so a drag showed no feedback at all. Tokens only, and
|
|
176
|
+
// the lifted item uses the raised shadow the rest of the library uses.
|
|
177
|
+
/* The affordance itself: a row that can be dragged says so, and a row that
|
|
178
|
+
delegates to a handle points at the handle instead. A display-only list
|
|
179
|
+
(reorderDisabled -> draggable="false") gets neither. */
|
|
180
|
+
.strct-reorder__handle {
|
|
181
|
+
cursor: grab;
|
|
182
|
+
}
|
|
183
|
+
[strctReorderItem][draggable='true']:not(:has(.strct-reorder__handle)) {
|
|
184
|
+
cursor: grab;
|
|
185
|
+
}
|
|
186
|
+
/* Both states are scoped through the item's own attribute, so a consumer's
|
|
187
|
+
base rule for the row (.ro-item { cursor: grab }) does not swallow a state
|
|
188
|
+
that lasts only while the pointer is down. A consumer who styles the state
|
|
189
|
+
itself still wins: their .row.strct-reorder--dragging has the same weight
|
|
190
|
+
and comes later. */
|
|
191
|
+
[strctReorderItem][draggable='true'].strct-reorder--dragging {
|
|
192
|
+
opacity: 0.6;
|
|
193
|
+
box-shadow: var(--shh);
|
|
194
|
+
cursor: grabbing;
|
|
195
|
+
}
|
|
196
|
+
[strctReorderItem][draggable='true'].strct-reorder--over {
|
|
197
|
+
box-shadow: inset 0 0 0 2px var(--acc50);
|
|
198
|
+
}
|
|
199
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
200
|
+
.strct-reorder--over {
|
|
201
|
+
transition: box-shadow 0.12s ease;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// A long id in a narrow card wraps instead of overflowing it.
|
|
206
|
+
.strct-code-inline--wrap {
|
|
207
|
+
white-space: normal;
|
|
208
|
+
overflow-wrap: anywhere;
|
|
209
|
+
}
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -2440,11 +2440,25 @@ declare class StrctCode {
|
|
|
2440
2440
|
declare class StrctCodeInline {
|
|
2441
2441
|
/** Append a copy button that copies this element's text. */
|
|
2442
2442
|
readonly copyable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2443
|
+
/**
|
|
2444
|
+
* What the copy button puts on the clipboard, when that is not simply what
|
|
2445
|
+
* the element says — a span showing a shortened thumbprint copies the whole
|
|
2446
|
+
* one. Empty follows the element's own text, including later changes.
|
|
2447
|
+
*/
|
|
2448
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
2449
|
+
/** Long ids wrap instead of overflowing a narrow card. */
|
|
2450
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2443
2451
|
private readonly host;
|
|
2444
2452
|
private readonly vcr;
|
|
2453
|
+
private readonly destroyRef;
|
|
2454
|
+
/** The button, once it exists; and a counter the observer bumps. */
|
|
2455
|
+
private readonly copyRef;
|
|
2456
|
+
private readonly revision;
|
|
2445
2457
|
constructor();
|
|
2458
|
+
/** What the element says, without the copy button's own content. */
|
|
2459
|
+
private ownText;
|
|
2446
2460
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctCodeInline, never>;
|
|
2447
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctCodeInline, "[strctCode]", never, { "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2461
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<StrctCodeInline, "[strctCode]", never, { "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2448
2462
|
}
|
|
2449
2463
|
|
|
2450
2464
|
/** One active filter chip in a {@link StrctFilterBar}. */
|
|
@@ -6477,6 +6491,7 @@ declare class StrctWindow {
|
|
|
6477
6491
|
protected readonly L: _angular_core.Signal<StrctWindowLabels>;
|
|
6478
6492
|
private readonly service;
|
|
6479
6493
|
private readonly doc;
|
|
6494
|
+
private readonly zone;
|
|
6480
6495
|
private readonly host;
|
|
6481
6496
|
private readonly zOffset;
|
|
6482
6497
|
protected readonly zIndex: _angular_core.Signal<string>;
|
|
@@ -6486,6 +6501,8 @@ declare class StrctWindow {
|
|
|
6486
6501
|
private readonly fallback;
|
|
6487
6502
|
protected readonly rect: _angular_core.Signal<StrctWindowBounds>;
|
|
6488
6503
|
private restoreTo;
|
|
6504
|
+
/** A click beside the window, when `closeOnOutside` asks for one. */
|
|
6505
|
+
private readonly onOutside;
|
|
6489
6506
|
constructor();
|
|
6490
6507
|
/** Raise this window above the others when it is clicked. */
|
|
6491
6508
|
protected focusWindow(): void;
|
|
@@ -6563,6 +6580,7 @@ declare class StrctChatThread {
|
|
|
6563
6580
|
private readonly host;
|
|
6564
6581
|
/** False once the reader scrolls away from the end; true again at the end. */
|
|
6565
6582
|
private readonly atEnd;
|
|
6583
|
+
private readonly destroyRef;
|
|
6566
6584
|
constructor();
|
|
6567
6585
|
protected onScroll(): void;
|
|
6568
6586
|
/** Jump to the newest message. */
|