@apliteni/apliteni-ui 0.53.2 → 0.53.4
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/package.json +1 -1
- package/src/styles/callout.css +15 -77
- package/src/styles/table.css +3 -1
- package/src/tokens/tokens.css +2 -0
package/package.json
CHANGED
package/src/styles/callout.css
CHANGED
|
@@ -31,62 +31,40 @@
|
|
|
31
31
|
|
|
32
32
|
/* ----------------------------------------------------------------------------
|
|
33
33
|
* Toast — a floating, dismissible notification.
|
|
34
|
-
*
|
|
35
|
-
* status success · danger · warn · info · neutral → sets --toast-accent/-action-ink/-glow/-on/-solid
|
|
36
|
-
* style soft (tinted) · solid (filled) · outline (bordered)
|
|
34
|
+
* Neutral card; tone is carried by the unfilled glyph and action.
|
|
37
35
|
* -------------------------------------------------------------------------- */
|
|
38
36
|
.ui-toast {
|
|
39
37
|
position: relative;
|
|
40
38
|
display: flex;
|
|
41
|
-
align-items:
|
|
39
|
+
align-items: center;
|
|
42
40
|
gap: 12px;
|
|
43
|
-
padding:
|
|
44
|
-
border-radius: var(--radius-
|
|
41
|
+
padding: var(--space-3);
|
|
42
|
+
border-radius: var(--radius-sm);
|
|
45
43
|
color: var(--text);
|
|
46
44
|
font-size: var(--text-base);
|
|
47
45
|
width: 100%;
|
|
48
46
|
max-width: var(--panel-md);
|
|
49
|
-
overflow: hidden; /* clips the timer bar
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
where it already drew it. why: docs/specification.md#elevation */
|
|
47
|
+
overflow: hidden; /* clips the timer bar to the rounded corners */
|
|
48
|
+
background: var(--surface); --ring-gap: var(--surface);
|
|
49
|
+
border: 1px solid var(--border);
|
|
53
50
|
box-shadow: inset 0 0 0 1px var(--elev-edge, var(--border)), var(--elev-drop);
|
|
54
51
|
animation: ui-toast-in var(--dur-med) var(--ease-out) both;
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
/*
|
|
58
|
-
--toast-accent is the status as a line or a small mark, --toast-glow its wash,
|
|
59
|
-
--toast-on the glyph ink on the accent circle. --toast-solid and
|
|
60
|
-
--toast-action-ink are separate from the accent on purpose: a fill and a piece
|
|
61
|
-
of text are different jobs from a 22px circle.
|
|
62
|
-
why: docs/specification.md#colour-and-contrast */
|
|
54
|
+
/* Existing tone inks also colour the unfilled glyph. */
|
|
63
55
|
.ui-toast--success { --toast-accent: var(--green); --toast-action-ink: var(--chip-success-ink); --toast-glow: var(--glow-green); --toast-on: var(--signal-contrast); --toast-solid: var(--signal-solid-success); }
|
|
64
56
|
.ui-toast--danger { --toast-accent: var(--pink); --toast-action-ink: var(--chip-danger-ink); --toast-glow: var(--glow-pink); --toast-on: var(--danger-contrast); --toast-solid: var(--signal-solid-danger); }
|
|
65
57
|
.ui-toast--warn { --toast-accent: var(--amber); --toast-action-ink: var(--chip-warn-ink); --toast-glow: color-mix(in srgb, var(--amber) 14%, transparent); --toast-on: var(--signal-contrast); --toast-solid: var(--signal-solid-warn); }
|
|
66
58
|
.ui-toast--info { --toast-accent: var(--cyan); --toast-action-ink: var(--chip-info-ink); --toast-glow: var(--glow-cyan); --toast-on: var(--signal-contrast); --toast-solid: var(--signal-solid-info); }
|
|
67
59
|
.ui-toast--neutral { --toast-accent: var(--muted); --toast-action-ink: var(--text); --toast-glow: var(--surface-2); --toast-on: var(--signal-solid-ink); --toast-solid: var(--signal-solid-neutral); }
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
.ui-
|
|
71
|
-
.ui-toast--outline::before {
|
|
72
|
-
content: ''; position: absolute; left: 0; top: 0; bottom: 0;
|
|
73
|
-
width: 3px; background: var(--toast-accent);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ui-toast__icon { width: 22px; height: 22px; flex: none; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: var(--toast-accent); color: var(--toast-on); }
|
|
77
|
-
.ui-toast__icon svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.8; } /* 2.8 of a 24 box drawn at 13px = 1.52 CSS px. The circle has no room for a bigger glyph, so the weight comes out of the stroke. docs/specification.md#icons-and-glyphs */
|
|
61
|
+
.ui-toast__icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: transparent; color: var(--toast-action-ink); }
|
|
62
|
+
.ui-toast__icon svg { width: var(--space-4); height: var(--space-4); stroke: currentColor; fill: none; stroke-width: 2.25; } /* 16px × 2.25 / 24 = 1.5 CSS px. */
|
|
78
63
|
.ui-toast__body { flex: 1; min-width: 0; }
|
|
79
64
|
.ui-toast__title { font-weight: var(--weight-medium); color: var(--strong); }
|
|
80
65
|
.ui-toast__text { color: var(--text); }
|
|
81
66
|
|
|
82
|
-
/*
|
|
83
|
-
text-grade ink rather than the accent.
|
|
84
|
-
The hover wash is the page background rather than the accent again: a second
|
|
85
|
-
accent tint on an already accent-tinted ground moved the ground TOWARDS the
|
|
86
|
-
ink and took every soft pair below the floor. --bg is white in the light theme
|
|
87
|
-
and near-black in the dark one, so one expression lightens the ground where
|
|
88
|
-
the ink is dark and darkens it where the ink is bright — the hovered pair is
|
|
89
|
-
at or above the resting pair in both. */
|
|
67
|
+
/* Tone ink keeps actions readable on the neutral surface. */
|
|
90
68
|
.ui-toast__action { flex: none; align-self: center; background: none; border: 0; padding: 4px 9px; border-radius: var(--radius-xs); font: inherit; font-weight: var(--weight-medium); color: var(--toast-action-ink); cursor: pointer; }
|
|
91
69
|
.ui-toast__action:hover { background: color-mix(in srgb, var(--bg) 55%, transparent); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */ }
|
|
92
70
|
|
|
@@ -98,7 +76,7 @@
|
|
|
98
76
|
TARGET grows instead and the glyph does not move at all.
|
|
99
77
|
Centred, so the overhang is 2.5px on every side. It has 12px of flex gap to
|
|
100
78
|
.ui-toast__action beside it and 12px between stacked toasts, so it reaches no
|
|
101
|
-
neighbouring target; .ui-toast's overflow: hidden clips at
|
|
79
|
+
neighbouring target; .ui-toast's overflow: hidden clips at 12px of padding,
|
|
102
80
|
well outside it. Measured, not asserted:
|
|
103
81
|
stories/guidelines/accessibility-floor.test.js reads this rule out of the
|
|
104
82
|
sheet and reports the target it makes. #219 */
|
|
@@ -117,51 +95,11 @@
|
|
|
117
95
|
.ui-toast__timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--toast-accent); opacity: 0.85; transform-origin: left; }
|
|
118
96
|
.ui-toast__timer.is-running { animation: ui-toast-timer var(--toast-dur, 5s) linear forwards; /* motion: ambient — the bar spends the toast's dismiss timer, which the caller sets */ }
|
|
119
97
|
|
|
120
|
-
/* style
|
|
121
|
-
|
|
122
|
-
.ui-toast--soft {
|
|
123
|
-
background: var(--toast-glow); /* ring-gap: inherit — translucent wash retains the opaque containing gap. */
|
|
124
|
-
border: 1px solid color-mix(in srgb, var(--toast-accent) 22%, transparent);
|
|
125
|
-
--elev-edge: color-mix(in srgb, var(--toast-accent) 11%, transparent);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/* style: solid — the status at fill strength, inked with the pole opposite it.
|
|
129
|
-
The fill and the ink are one pair, taken together from --signal-solid-*: dark
|
|
130
|
-
fills are the bright signals and take near-black, light fills are the deepened
|
|
131
|
-
ones and take white. What this replaced picked the fill from the status and
|
|
132
|
-
the ink from one of two globals, on independent axes, so nothing made them
|
|
133
|
-
clear each other — and four of the ten status x theme combinations did not.
|
|
134
|
-
Gated for all ten in stories/signal-contrast.test.js. See #149. */
|
|
135
|
-
.ui-toast--solid {
|
|
136
|
-
--toast-ink: var(--signal-solid-ink); --ring-color: var(--toast-ink);
|
|
137
|
-
background: var(--toast-solid); --ring-gap: var(--toast-solid);
|
|
138
|
-
color: var(--toast-ink);
|
|
139
|
-
/* No inner line: a solid toast has no outer one either. It keeps the drop. */
|
|
140
|
-
--elev-edge: transparent;
|
|
141
|
-
}
|
|
142
|
-
.ui-toast--solid .ui-toast__title { color: var(--toast-ink); }
|
|
143
|
-
/* The body copy is the quieter of the two, but it stays quiet by dilution the
|
|
144
|
-
pair can carry: 90% of the ink measures 4.71 on the worst fill in the matrix
|
|
145
|
-
(--chip-success-ink in light). The opacity: 0.82 this replaced measured 4.19
|
|
146
|
-
there, and 2.25 on the dark danger fill — the pair was correct and the
|
|
147
|
-
dilution then spent it. */
|
|
148
|
-
.ui-toast--solid .ui-toast__text { color: var(--toast-ink); }
|
|
149
|
-
.ui-toast--solid .ui-toast__icon { background: color-mix(in srgb, var(--toast-ink) 22%, transparent); /* ring-gap: inherit — decorative or text-only surface has no nested focus target. */ color: var(--toast-ink); }
|
|
150
|
-
.ui-toast--solid .ui-toast__action { color: var(--toast-ink); }
|
|
151
|
-
/* Hover darkens the FILL rather than lightening the ink. Washing the ink over
|
|
152
|
-
itself was the one surface #149 did not reach, and it worked against the pair
|
|
153
|
-
it was drawn from: it pulled the fill towards the ink it has to clear. */
|
|
154
|
-
.ui-toast--solid .ui-toast__action:hover { background: color-mix(in srgb, var(--signal-contrast) 14%, transparent); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */ }
|
|
155
|
-
.ui-toast--solid .ui-toast__close { /* muted-ink: glyph — dismiss icon on solid toast */ color: color-mix(in srgb, var(--toast-ink) 68%, transparent); }
|
|
156
|
-
.ui-toast--solid .ui-toast__close:hover { color: var(--toast-ink); }
|
|
157
|
-
.ui-toast--solid .ui-toast__timer { background: color-mix(in srgb, var(--toast-ink) 55%, transparent); /* ring-gap: inherit — decorative or text-only surface has no nested focus target. */ }
|
|
158
|
-
|
|
159
|
-
/* style: outline — elevated card with a status-tinted border */
|
|
160
|
-
.ui-toast--outline { background: var(--bg-elevated); --ring-gap: var(--bg-elevated); border: 1px solid color-mix(in srgb, var(--toast-accent) 40%, transparent); --elev-edge: color-mix(in srgb, var(--toast-accent) 20%, transparent); }
|
|
98
|
+
/* Legacy style classes share the neutral card. */
|
|
99
|
+
.ui-toast--soft, .ui-toast--solid, .ui-toast--outline { background: var(--surface); --ring-gap: var(--surface); color: var(--text); }
|
|
161
100
|
|
|
162
101
|
/* compact — single line, no body text */
|
|
163
|
-
.ui-toast--compact { align-items: center;
|
|
164
|
-
.ui-toast--compact .ui-toast__icon { margin-top: 0; }
|
|
102
|
+
.ui-toast--compact { align-items: center; }
|
|
165
103
|
|
|
166
104
|
@keyframes ui-toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
|
|
167
105
|
@keyframes ui-toast-out { to { opacity: 0; transform: translateX(24px); } }
|
package/src/styles/table.css
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
* Cell helpers: .ui-table__num (right, tabular), .ui-table__code.
|
|
55
55
|
* why: docs/specification.md#spacing-and-rhythm
|
|
56
56
|
* held by: stories/table-rhythm.test.js */
|
|
57
|
-
.ui-table--dense th { padding: 0 var(--space-3) var(--space-2)
|
|
57
|
+
.ui-table--dense th { padding: 0 var(--space-3) var(--space-2); }
|
|
58
58
|
.ui-table--dense td { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); white-space: nowrap; }
|
|
59
59
|
.ui-table--dense th:first-child,
|
|
60
60
|
.ui-table--dense td:first-child { padding-left: var(--space-3); }
|
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
.ui-table td.ui-table__num { text-align: right; }
|
|
97
97
|
.ui-table--compact td { padding: var(--space-1) var(--space-3); font-size: var(--text-sm); line-height: var(--leading-snug); height: 33px; }
|
|
98
98
|
.ui-table--compact th { padding: var(--space-2) var(--space-3); }
|
|
99
|
+
.ui-table--compact th:last-child,
|
|
100
|
+
.ui-table--compact td:last-child { padding-right: var(--space-3); }
|
|
99
101
|
.ui-table-scroll { overflow: auto; max-height: var(--ui-table-height, 70vh); padding: 0 var(--space-1); }
|
|
100
102
|
.ui-table-scroll:focus-visible { outline: 2px solid transparent; box-shadow: var(--ring); }
|
|
101
103
|
.ui-table--sticky { border-collapse: separate; border-spacing: 0; }
|
package/src/tokens/tokens.css
CHANGED