@apliteni/apliteni-ui 0.53.1 → 0.53.3

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.
@@ -0,0 +1,13 @@
1
+ # Empty states
2
+
3
+ ## Explain what is missing and show the next step
4
+
5
+ <!-- rule: next-action -->
6
+
7
+ **Rule:** Use the kit’s `emptyState()` or React `EmptyState` when there is no content. Say what is missing and include an action that helps the reader continue. Inline “no matches” text inside a dropdown or command palette is a result message, not an empty state.
8
+
9
+ **Why:** A blank area may leave readers unsure whether there is no content or the page has failed.
10
+
11
+ **Do:** Show “No projects yet” with a “Create project” action. Use the kit’s existing spacing and illustration.
12
+
13
+ **Don't:** Show “Nothing here” without an action.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.53.1",
3
+ "version": "0.53.3",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -31,62 +31,40 @@
31
31
 
32
32
  /* ----------------------------------------------------------------------------
33
33
  * Toast — a floating, dismissible notification.
34
- * A status (colour) × style (surface) matrix, entirely token-driven:
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: flex-start;
39
+ align-items: center;
42
40
  gap: 12px;
43
- padding: 13px 15px;
44
- border-radius: var(--radius-md);
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 + left marker to the rounded corners */
50
- /* A toast floats. It carries a status rather than the neutral hairline, so each
51
- style below re-points --elev-edge at its own tint and leaves the outer line
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
- /* status → the paint tokens every style below consumes.
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
- /* left status marker (soft + outline; solid is already a full fill) */
70
- .ui-toast--soft::before,
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
- /* trailing action ("Undo" / "Retry") — status-coloured TEXT, so it takes the
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 15px of padding,
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: soft — tinted surface. The shadow used to be its edge, so it takes the
121
- status-tinted hairline the outline style carries, at half the weight. #295 */
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; padding-top: 10px; padding-bottom: 10px; }
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); } }
@@ -439,6 +439,8 @@
439
439
  .ui-table--zebra tbody tr:nth-child(even) td,
440
440
  .ui-table--zebra tbody tr:hover td,
441
441
  .ui-table--zebra.ui-table--hover tbody tr:hover td,
442
+ .ui-toast,
443
+ .ui-toast--soft,
442
444
  .ui-toast--outline,
443
445
  .ui-toast--solid,
444
446
  .vsw__menu {