@cngx/common 0.1.0-rc.9 → 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/a11y/README.md +15 -2
- package/button/README.md +258 -0
- package/command/README.md +19 -8
- package/data/README.md +10 -10
- package/fesm2022/cngx-common-a11y.mjs +701 -263
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +83 -64
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-button.mjs +1084 -0
- package/fesm2022/cngx-common-button.mjs.map +1 -0
- package/fesm2022/cngx-common-card.mjs +135 -76
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +749 -296
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +51 -29
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +695 -405
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +112 -112
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +668 -308
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +7066 -2739
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +2121 -492
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-menu-button.mjs +557 -0
- package/fesm2022/cngx-common-menu-button.mjs.map +1 -0
- package/fesm2022/cngx-common-popover.mjs +1207 -569
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +256 -261
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +202 -262
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +28 -61
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +10 -10
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +30 -19
- package/layout/README.md +1 -1
- package/menu-button/README.md +234 -0
- package/package.json +14 -4
- package/popover/README.md +42 -5
- package/popover/tooltip-indicator.scss +52 -0
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.json +5 -0
- package/stepper/README.md +0 -1
- package/theming/components/cngx-accordion.css +36 -7
- package/theming/components/cngx-async.css +185 -37
- package/theming/components/cngx-backdrop.css +3 -1
- package/theming/components/cngx-badge.css +20 -5
- package/theming/components/cngx-bottom-sheet.css +2 -0
- package/theming/components/cngx-breadcrumb.css +3 -1
- package/theming/components/cngx-button-group.css +325 -0
- package/theming/components/cngx-button-toggle.css +55 -23
- package/theming/components/cngx-button.css +975 -0
- package/theming/components/cngx-data-grid.css +2 -0
- package/theming/components/cngx-dialog.css +3 -1
- package/theming/components/cngx-divider.css +24 -9
- package/theming/components/cngx-drawer.css +153 -0
- package/theming/components/cngx-icon-glyph.css +76 -0
- package/theming/components/cngx-listbox.css +79 -25
- package/theming/components/cngx-menu.css +112 -52
- package/theming/components/cngx-nav.css +1220 -0
- package/theming/components/cngx-popover-sheet.css +43 -11
- package/theming/components/cngx-popover.css +37 -13
- package/theming/components/cngx-recycler-placeholder.css +2 -0
- package/theming/components/cngx-ripple.css +74 -16
- package/theming/components/cngx-sidebar.css +71 -0
- package/theming/components/cngx-slider.css +3 -1
- package/theming/components/cngx-tooltip.css +2 -0
- package/timeline/README.md +2 -2
- package/types/cngx-common-a11y.d.ts +343 -120
- package/types/cngx-common-audio.d.ts +60 -88
- package/types/cngx-common-button.d.ts +698 -0
- package/types/cngx-common-card.d.ts +104 -78
- package/types/cngx-common-chart.d.ts +671 -384
- package/types/cngx-common-command.d.ts +44 -47
- package/types/cngx-common-data.d.ts +350 -342
- package/types/cngx-common-dialog.d.ts +91 -120
- package/types/cngx-common-display.d.ts +475 -300
- package/types/cngx-common-interactive.d.ts +4350 -1723
- package/types/cngx-common-layout.d.ts +1365 -286
- package/types/cngx-common-menu-button.d.ts +382 -0
- package/types/cngx-common-popover.d.ts +671 -289
- package/types/cngx-common-stepper.d.ts +217 -347
- package/types/cngx-common-tabs.d.ts +173 -386
- package/types/cngx-common-timeline.d.ts +25 -104
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
* - `sheet` - bottom-flush, full inline size, content-sized up to
|
|
19
19
|
* `--cngx-popover-sheet-max-block-size`, dimmed `::backdrop`
|
|
20
20
|
* - `fullscreen` - fills the dynamic viewport (`100dvh`)
|
|
21
|
-
* - `anchored` -
|
|
21
|
+
* - `anchored` - keeps the popover's position and inline size, capped at
|
|
22
|
+
* the space next to the anchor minus the anchor offset on both edges
|
|
22
23
|
*
|
|
23
|
-
* In
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* In every presentation the host is a non-scrolling flex column: the
|
|
25
|
+
* `cngxPopoverSheetHeader` part stays put as a row and every other direct
|
|
26
|
+
* child scrolls. A swipe region inside a scrolling panel never fires, so
|
|
27
|
+
* only the content below the header may scroll. A footer that must stay
|
|
28
|
+
* pinned sets `flex: none`.
|
|
27
29
|
*
|
|
28
30
|
* **Settling**
|
|
29
31
|
*
|
|
@@ -55,6 +57,8 @@
|
|
|
55
57
|
* **Pair with**
|
|
56
58
|
*
|
|
57
59
|
* - `@cngx/themes/material/popover-sheet-theme` - Material 3 surface
|
|
60
|
+
*
|
|
61
|
+
* @themes CngxPopoverSheet, CngxPopoverSheetHeader
|
|
58
62
|
*/
|
|
59
63
|
|
|
60
64
|
@layer cngx.tokens {
|
|
@@ -264,11 +268,16 @@
|
|
|
264
268
|
|
|
265
269
|
.cngx-popover-sheet:is([data-cngx-presentation='sheet'], [data-cngx-presentation='fullscreen']) {
|
|
266
270
|
position: fixed;
|
|
267
|
-
|
|
271
|
+
/* Span the full layout viewport width (100vw includes the classic
|
|
272
|
+
scrollbar gutter) rather than `100%` of the fixed containing block,
|
|
273
|
+
which excludes the gutter and left the sheet inset ~11px on a classic
|
|
274
|
+
scrollbar. The sheet is modal and locks scroll, so 100vw never overflows
|
|
275
|
+
into a horizontal scrollbar. */
|
|
276
|
+
inset: auto auto 0 0;
|
|
268
277
|
margin: 0;
|
|
269
278
|
box-sizing: border-box;
|
|
270
|
-
inline-size:
|
|
271
|
-
max-inline-size:
|
|
279
|
+
inline-size: 100vw;
|
|
280
|
+
max-inline-size: 100vw;
|
|
272
281
|
min-inline-size: 0;
|
|
273
282
|
max-block-size: var(--cngx-popover-sheet-max-block-size, 80dvh);
|
|
274
283
|
flex-direction: column;
|
|
@@ -297,11 +306,26 @@
|
|
|
297
306
|
* `[popover]:not(:popover-open) { display: none }` and keep it rendered. */
|
|
298
307
|
.cngx-popover-sheet:is(
|
|
299
308
|
[data-cngx-presentation='sheet'],
|
|
300
|
-
[data-cngx-presentation='fullscreen']
|
|
309
|
+
[data-cngx-presentation='fullscreen'],
|
|
310
|
+
[data-cngx-presentation='anchored']
|
|
301
311
|
):popover-open {
|
|
302
312
|
display: flex;
|
|
303
313
|
}
|
|
304
314
|
|
|
315
|
+
/* Anchored keeps the popover's position and inline size; it gets the
|
|
316
|
+
* column model and a cap at the space next to the anchor. Under
|
|
317
|
+
* `position-area` the containing block is the area cell and the margin box
|
|
318
|
+
* (the anchor offset on both block edges) must fit inside it. The offset
|
|
319
|
+
* comes as one length: the margin property is a shorthand `calc()` cannot
|
|
320
|
+
* multiply. Without anchor positioning `100%` resolves against the
|
|
321
|
+
* viewport. */
|
|
322
|
+
.cngx-popover-sheet[data-cngx-presentation='anchored'] {
|
|
323
|
+
flex-direction: column;
|
|
324
|
+
overflow: hidden;
|
|
325
|
+
max-block-size: calc(100% - 2 * var(--cngx-popover-anchor-offset, 0px));
|
|
326
|
+
position-try-order: most-block-size;
|
|
327
|
+
}
|
|
328
|
+
|
|
305
329
|
.cngx-popover-sheet[data-cngx-presentation='fullscreen'] {
|
|
306
330
|
inset: 0;
|
|
307
331
|
block-size: 100dvh;
|
|
@@ -339,7 +363,11 @@
|
|
|
339
363
|
|
|
340
364
|
/* Only the content below the header scrolls: a swipe region inside a
|
|
341
365
|
* scrolling panel never fires. */
|
|
342
|
-
.cngx-popover-sheet:is(
|
|
366
|
+
.cngx-popover-sheet:is(
|
|
367
|
+
[data-cngx-presentation='sheet'],
|
|
368
|
+
[data-cngx-presentation='fullscreen'],
|
|
369
|
+
[data-cngx-presentation='anchored']
|
|
370
|
+
)
|
|
343
371
|
> * {
|
|
344
372
|
flex: 1 1 auto;
|
|
345
373
|
min-block-size: 0;
|
|
@@ -348,7 +376,11 @@
|
|
|
348
376
|
}
|
|
349
377
|
|
|
350
378
|
/* Handle on its own row, title and controls on the next one. */
|
|
351
|
-
.cngx-popover-sheet:is(
|
|
379
|
+
.cngx-popover-sheet:is(
|
|
380
|
+
[data-cngx-presentation='sheet'],
|
|
381
|
+
[data-cngx-presentation='fullscreen'],
|
|
382
|
+
[data-cngx-presentation='anchored']
|
|
383
|
+
)
|
|
352
384
|
> .cngx-popover-sheet-header {
|
|
353
385
|
flex: none;
|
|
354
386
|
overflow: visible;
|
|
@@ -4,25 +4,49 @@
|
|
|
4
4
|
*
|
|
5
5
|
* A `CngxPopover` host is a native popover element (`[attr.popover]`), so the
|
|
6
6
|
* browser paints its UA chrome - a `3px solid` border, a `Canvas` background
|
|
7
|
-
* and `0.25em` padding.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* chrome and reads as an unstyled black-bordered box.
|
|
7
|
+
* and `0.25em` padding. A *bare* popover (a menu placed directly in
|
|
8
|
+
* `[cngxPopover]`, e.g. a headless context menu) would inherit that UA chrome
|
|
9
|
+
* and read as an unstyled black-bordered box.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
11
|
+
* The reset runs at `:where()` zero specificity, so any surface that paints
|
|
12
|
+
* itself on the popover element (`CngxPopoverPanel`, the select panels, the
|
|
13
|
+
* tabs overflow menu, the sheet presentation, a consumer class) wins by
|
|
14
|
+
* specificity in the same layer; this sheet names none of them. A surface
|
|
15
|
+
* that leaves a reset property unset (its text colour, say) gets the reset
|
|
16
|
+
* value, so it sets what it owns. Only the chrome is reset - positioning
|
|
17
|
+
* (`inset`, `position-anchor`) is owned by `CngxPopover`. The UA
|
|
18
|
+
* `overflow: auto` goes too: the host is exactly as large as its content, so
|
|
19
|
+
* it would clip the shadow of the surface inside it (a `cngxMenu`'s
|
|
20
|
+
* elevation).
|
|
21
|
+
*
|
|
22
|
+
* The anchor offset margin is written by `CngxPopover` as the
|
|
23
|
+
* `--cngx-popover-anchor-margin` custom property and applied here in the
|
|
24
|
+
* components layer, so a Material bridge can zero it by setting the variable
|
|
25
|
+
* (no `!important` needed - an inline `margin` could only be beaten by one).
|
|
26
|
+
* The sheet and fullscreen presentations own their box, so the margin rule
|
|
27
|
+
* skips them.
|
|
28
|
+
*
|
|
29
|
+
* @themes CngxPopover
|
|
18
30
|
*/
|
|
19
31
|
@layer cngx.components {
|
|
20
|
-
[cngxPopover]
|
|
21
|
-
.cngx-tab-overflow__panel
|
|
22
|
-
):not([data-cngx-presentation='sheet']):not([data-cngx-presentation='fullscreen']) {
|
|
32
|
+
:where([cngxPopover]) {
|
|
23
33
|
border: 0;
|
|
24
34
|
padding: 0;
|
|
25
35
|
background: transparent;
|
|
26
36
|
color: inherit;
|
|
37
|
+
overflow: visible;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* The anchor offset margin, applied to every anchored popover (the styled
|
|
41
|
+
panels included) from the custom property the directive writes inline.
|
|
42
|
+
`--cngx-popover-margin-override` lets a theme (the Material select bridge)
|
|
43
|
+
force the margin to 0 without `!important`: a stylesheet cannot outrank the
|
|
44
|
+
directive's inline `--cngx-popover-anchor-margin`, but the override var is
|
|
45
|
+
read first and is not set inline, so the theme's value wins. Sheet and
|
|
46
|
+
fullscreen presentations own their own box, so they are excluded. */
|
|
47
|
+
[cngxPopover]:not([data-cngx-presentation='sheet']):not(
|
|
48
|
+
[data-cngx-presentation='fullscreen']
|
|
49
|
+
) {
|
|
50
|
+
margin: var(--cngx-popover-margin-override, var(--cngx-popover-anchor-margin, 0));
|
|
27
51
|
}
|
|
28
52
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @overview
|
|
3
3
|
* Theming bridge for the `CngxRipple` directive. The directive
|
|
4
|
-
* injects `<span class="cngx-ripple__wave">` into
|
|
5
|
-
* pointerdown and removes
|
|
6
|
-
*
|
|
7
|
-
* and DOM injection.
|
|
4
|
+
* injects `<span class="cngx-ripple__wave">` into a
|
|
5
|
+
* `<span class="cngx-ripple__container">` on pointerdown and removes
|
|
6
|
+
* the wave after the animation completes; all visual treatment lives
|
|
7
|
+
* here, the directive only handles geometry and DOM injection.
|
|
8
|
+
*
|
|
9
|
+
* **Clipping**
|
|
10
|
+
*
|
|
11
|
+
* The container covers the host (`inset: 0`), inherits its
|
|
12
|
+
* `border-radius` and clips with `overflow: hidden`, so only the wave
|
|
13
|
+
* is cut to the host shape. The host is never clipped: a touch hit-area
|
|
14
|
+
* pseudo-element, a corner badge or a focus ring may overhang it. The
|
|
15
|
+
* `.cngx-ripple` host class adds `position: relative` at zero
|
|
16
|
+
* specificity so an already positioned host keeps its own value.
|
|
8
17
|
*
|
|
9
18
|
* **Animation**
|
|
10
19
|
*
|
|
@@ -12,9 +21,13 @@
|
|
|
12
21
|
* `--cngx-ripple-duration` and fades opacity from
|
|
13
22
|
* `--cngx-ripple-opacity` to 0.
|
|
14
23
|
*
|
|
15
|
-
* Under
|
|
16
|
-
*
|
|
17
|
-
*
|
|
24
|
+
* Under reduced motion (`[data-motion='reduced']` on an ancestor, or
|
|
25
|
+
* `prefers-reduced-motion: reduce` without a root `data-motion='full'`)
|
|
26
|
+
* the wave skips the expansion: it appears at full size and fades
|
|
27
|
+
* with `cngx-ripple-fade`. With `motion-tokens.css` loaded (it is part
|
|
28
|
+
* of `@cngx/themes/cngx.css`) the safety net collapses that fade to
|
|
29
|
+
* 0.01ms, so the wave is effectively not shown; the fade only plays
|
|
30
|
+
* where the net is not loaded.
|
|
18
31
|
*
|
|
19
32
|
* **Per-instance geometry**
|
|
20
33
|
*
|
|
@@ -24,12 +37,22 @@
|
|
|
24
37
|
*
|
|
25
38
|
* **Inheritance**
|
|
26
39
|
*
|
|
40
|
+
* The wave sits two levels below the host (host > container > wave),
|
|
41
|
+
* so all three surface tokens inherit: a value set on the host or an
|
|
42
|
+
* ancestor reaches the wave. The Material bridge sets the tokens on
|
|
43
|
+
* every `.cngx-ripple` host, so with the bridge loaded an override
|
|
44
|
+
* must sit on the host itself; an ancestor value is shadowed there.
|
|
45
|
+
* The directive writes `--cngx-ripple-color` inline only when
|
|
46
|
+
* `[rippleColor]` is bound.
|
|
47
|
+
*
|
|
27
48
|
* - `--cngx-ripple-color` defaults to `currentColor` so the wave
|
|
28
49
|
* tracks the host's text color without a per-component override
|
|
29
50
|
*
|
|
30
51
|
* **Pair with**
|
|
31
52
|
*
|
|
32
53
|
* - `@cngx/themes/material/ripple-theme` - Material state-layer surface
|
|
54
|
+
*
|
|
55
|
+
* @themes CngxRipple
|
|
33
56
|
*/
|
|
34
57
|
|
|
35
58
|
@layer cngx.tokens {
|
|
@@ -51,7 +74,7 @@
|
|
|
51
74
|
*/
|
|
52
75
|
@property --cngx-ripple-opacity {
|
|
53
76
|
syntax: '<number>';
|
|
54
|
-
inherits:
|
|
77
|
+
inherits: true;
|
|
55
78
|
initial-value: 0.12;
|
|
56
79
|
}
|
|
57
80
|
|
|
@@ -61,17 +84,35 @@
|
|
|
61
84
|
*/
|
|
62
85
|
@property --cngx-ripple-duration {
|
|
63
86
|
syntax: '<time>';
|
|
64
|
-
inherits:
|
|
87
|
+
inherits: true;
|
|
65
88
|
initial-value: 0.5s;
|
|
66
89
|
}
|
|
67
90
|
}
|
|
68
91
|
|
|
69
92
|
@layer cngx.components {
|
|
93
|
+
:where(.cngx-ripple) {
|
|
94
|
+
position: relative;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@scope (.cngx-ripple__container) {
|
|
98
|
+
:scope {
|
|
99
|
+
position: absolute;
|
|
100
|
+
inset: 0;
|
|
101
|
+
border-radius: inherit;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
70
107
|
@scope (.cngx-ripple__wave) {
|
|
71
108
|
:scope {
|
|
72
109
|
position: absolute;
|
|
110
|
+
/* Physical on purpose: the directive measures --cngx-ripple-x from the
|
|
111
|
+
host's left edge (clientX - rect.left) and the translate below is
|
|
112
|
+
physical too, so a logical start anchor would put the wave on the
|
|
113
|
+
wrong side under dir="rtl". */
|
|
73
114
|
top: 0;
|
|
74
|
-
|
|
115
|
+
left: 0;
|
|
75
116
|
width: var(--cngx-ripple-size, 100px);
|
|
76
117
|
height: var(--cngx-ripple-size, 100px);
|
|
77
118
|
border-radius: 50%;
|
|
@@ -84,13 +125,30 @@
|
|
|
84
125
|
);
|
|
85
126
|
animation: cngx-ripple-expand var(--cngx-ripple-duration, 0.5s) ease-out forwards;
|
|
86
127
|
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Reduced motion follows the same axis as the safety net in
|
|
131
|
+
motion-tokens.css: a [data-motion='reduced'] ancestor (provideMotion,
|
|
132
|
+
cngxMotionScope), or the OS preference unless the root opts back in with
|
|
133
|
+
data-motion='full'. The wave appears at full size and only fades, so
|
|
134
|
+
animationend still removes it (instantly under the safety net). */
|
|
135
|
+
[data-motion='reduced'] .cngx-ripple__wave {
|
|
136
|
+
animation-name: cngx-ripple-fade;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@media (prefers-reduced-motion: reduce) {
|
|
140
|
+
:root:not([data-motion='full']) .cngx-ripple__wave {
|
|
141
|
+
animation-name: cngx-ripple-fade;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
87
144
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
145
|
+
@keyframes cngx-ripple-fade {
|
|
146
|
+
0% {
|
|
147
|
+
opacity: var(--cngx-ripple-opacity, 0.12);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
100% {
|
|
151
|
+
opacity: 0;
|
|
94
152
|
}
|
|
95
153
|
}
|
|
96
154
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @overview
|
|
3
|
+
* Base skin for `CngxSidebar`. Opt-in: add the `.cngx-sidebar` class
|
|
4
|
+
* alongside `[cngxSidebar]`. The class, not the attribute, keeps the skin
|
|
5
|
+
* out of `cngx-sidenav`, which composes `CngxSidebar` as a host directive
|
|
6
|
+
* and ships its own stylesheet.
|
|
7
|
+
*
|
|
8
|
+
* The skin styles the sidebar box only: a scrolling flex column on a
|
|
9
|
+
* surface with a border on the side facing the content (`data-sidebar-side`,
|
|
10
|
+
* written by the directive; none while `data-sidebar-state` is `hidden`, so
|
|
11
|
+
* a hidden sidebar paints nothing), and a shadow over the content while it
|
|
12
|
+
* peeks.
|
|
13
|
+
* It sets no padding or gap for the content and selects nothing inside it.
|
|
14
|
+
*
|
|
15
|
+
* What the content does on the rail is the content's business: nav rows
|
|
16
|
+
* crop themselves under `[cngxNavRailed]` (`cngx-nav.css`). The page shell
|
|
17
|
+
* around the sidebar is the consumer's.
|
|
18
|
+
*
|
|
19
|
+
* **Inheritance**
|
|
20
|
+
*
|
|
21
|
+
* - `--cngx-sidebar-bg` -> `--cngx-color-surface` with a 3% tint of
|
|
22
|
+
* `--cngx-color-text`, so it sets off from the page in light and dark
|
|
23
|
+
* - `--cngx-sidebar-border-color` -> `--cngx-color-border`
|
|
24
|
+
* - `--cngx-sidebar-border-width` -> `1px`
|
|
25
|
+
* - `--cngx-sidebar-peek-shadow` -> `--cngx-shadow-md`
|
|
26
|
+
*
|
|
27
|
+
* @themes CngxSidebar
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
@layer cngx.components {
|
|
31
|
+
@scope (.cngx-sidebar) {
|
|
32
|
+
:scope {
|
|
33
|
+
/* Functional - a flex column that scrolls */
|
|
34
|
+
position: relative;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
flex: none;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
min-block-size: 0;
|
|
40
|
+
overflow-x: clip;
|
|
41
|
+
overflow-y: auto;
|
|
42
|
+
|
|
43
|
+
/* Themable - token-driven */
|
|
44
|
+
background: var(
|
|
45
|
+
--cngx-sidebar-bg,
|
|
46
|
+
color-mix(
|
|
47
|
+
in oklab,
|
|
48
|
+
var(--cngx-color-surface, oklch(1 0 0)) 97%,
|
|
49
|
+
var(--cngx-color-text, oklch(0.2 0.01 250))
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:scope[data-sidebar-side='start']:not([data-sidebar-state='hidden']) {
|
|
55
|
+
border-inline-end: var(--cngx-sidebar-border-width, 1px) solid
|
|
56
|
+
var(--cngx-sidebar-border-color, var(--cngx-color-border, oklch(0.92 0 0)));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:scope[data-sidebar-side='end']:not([data-sidebar-state='hidden']) {
|
|
60
|
+
border-inline-start: var(--cngx-sidebar-border-width, 1px) solid
|
|
61
|
+
var(--cngx-sidebar-border-color, var(--cngx-color-border, oklch(0.92 0 0)));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:scope[data-sidebar-state='peek'] {
|
|
65
|
+
box-shadow: var(
|
|
66
|
+
--cngx-sidebar-peek-shadow,
|
|
67
|
+
var(--cngx-shadow-md, 0 4px 16px oklch(0 0 0 / 0.12))
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
* - track / fill colour -> `--cngx-color-border` / `--cngx-color-primary`
|
|
29
29
|
* - thumb fill -> `--cngx-color-surface`, border -> `--cngx-color-primary`
|
|
30
30
|
* - focus ring -> `--cngx-color-primary` (contrast >= 3:1 against the surface)
|
|
31
|
+
*
|
|
32
|
+
* @themes CngxSliderTrack, CngxRangeSliderTrack
|
|
31
33
|
*/
|
|
32
34
|
|
|
33
35
|
@layer cngx.tokens {
|
|
@@ -198,7 +200,7 @@
|
|
|
198
200
|
flex-direction: column;
|
|
199
201
|
inline-size: max-content;
|
|
200
202
|
min-inline-size: var(--cngx-slider-thumb-size, 16px);
|
|
201
|
-
block-size: var(--cngx-slider-length
|
|
203
|
+
block-size: var(--cngx-slider-length);
|
|
202
204
|
min-block-size: 0;
|
|
203
205
|
}
|
|
204
206
|
|
package/timeline/README.md
CHANGED
|
@@ -150,6 +150,6 @@ What the headless layer contributes, before any organism ARIA:
|
|
|
150
150
|
- [`@cngx/ui/timeline`](../../ui/timeline/) - the styled organism: grouping inputs, layout, skins, async body, Material bridge
|
|
151
151
|
- [`@cngx/common/stepper`](../stepper/) - guided process; timeline is history
|
|
152
152
|
- [`CngxTime`](../display/) - relative timestamp formatting for `[cngxTimelineTime]`
|
|
153
|
-
- [`CngxAsyncState`](../../core/) - the per-row `[state]` contract
|
|
154
|
-
- [API on compodocx](https://cngxjs.github.io/cngx/)
|
|
153
|
+
- [`CngxAsyncState`](../../core/utils/) - the per-row `[state]` contract
|
|
154
|
+
- [API on compodocx](https://cngxjs.github.io/cngx/main/common/timeline/)
|
|
155
155
|
- Tests: `projects/common/timeline/*.spec.ts`
|