@apliteni/apliteni-ui 0.37.0 → 0.37.1

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/README.md CHANGED
@@ -105,6 +105,10 @@ import { tokensCss, topbarCss, cssText } from '@apliteni/apliteni-ui/inline';
105
105
  // …inline tokensCss + topbarCss into the <style> you serve.
106
106
  ```
107
107
 
108
+ `cssText` includes every sheet. When selecting individual sheets from `styles`,
109
+ `successPanel()` needs both `styles.callout` (panel layout) and `styles.success`
110
+ (shared glowing check and reduced-motion styles), after `tokensCss` and `baseCss`.
111
+
108
112
  ## React components (stateful surfaces)
109
113
 
110
114
  `DataTable`, `Pagination`, `Modal`, `Button`, `Badge`, `Card` and `Icon` — same `.ui-*` classes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -2,10 +2,10 @@
2
2
  // viz/ server-render idiom so the portal can adopt them with no framework.
3
3
  import { icon } from '../assets/icons.js';
4
4
  import { illo } from '../assets/illustrations.js';
5
+ import { successCheck } from './success.js';
5
6
  const HTML_ENTITIES = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' };
6
7
  const cx = (...a) => a.filter(Boolean).join(' ');
7
8
  export const esc = (s) => String(s == null ? '' : s).replace(/[&<>"]/g, (c) => HTML_ENTITIES[c]);
8
-
9
9
  // ---- Button --------------------------------------------------------------
10
10
  // `iconSvg` is a raw leading-icon SVG string (trusted markup, not escaped) for
11
11
  // branded glyphs the kit's icon set doesn't own — e.g. a Google "G". It takes
@@ -261,9 +261,9 @@ export function toast({
261
261
  // The kit also publishes success() from components/success.js, which is the same
262
262
  // idea at page size: layouts, a backdrop, follow-up buttons and an auto-redirect
263
263
  // countdown. Pick by how much of the screen the confirmation owns. The two share
264
- // no CSS, so changing one never moves the other.
264
+ // the glowing check; their layout and content remain independent.
265
265
  export function successPanel({ title = 'Done', sub = '' } = {}) {
266
- return `<div class="ui-success"><div class="ui-success__check">${icon('check')}</div><div class="ui-success__title">${esc(title)}</div>${sub ? `<div class="ui-success__sub">${esc(sub)}</div>` : ''}</div>`;
266
+ return `<div class="ui-success"><div class="ui-success__check">${successCheck()}</div><div class="ui-success__title">${esc(title)}</div>${sub ? `<div class="ui-success__sub">${esc(sub)}</div>` : ''}</div>`;
267
267
  }
268
268
 
269
269
  // ---- Empty state ---------------------------------------------------------
@@ -60,8 +60,8 @@ function countdownEl({ seconds = 5, label = 'Redirecting' } = {}) {
60
60
  // For a confirmation that stays inside the page the user is already on, the kit
61
61
  // publishes successPanel() from components/index.js — a check, a title and one
62
62
  // line of sub, and nothing to configure. Pick by how much of the screen the
63
- // confirmation owns. The two share no CSS (.ui-sx here, .ui-success there), so
64
- // changing one never moves the other.
63
+ // confirmation owns. The two share the glowing check, while their layout
64
+ // and content remain independent.
65
65
  export function success({
66
66
  layout = 'hero', // 'hero' | 'split' | 'compact'
67
67
  level, // heading level of the title; see the note below
package/src/inline.js CHANGED
@@ -25,7 +25,7 @@ export const baseCss = read('styles/base.css');
25
25
  // Canonical topbar (same class names the portal already uses).
26
26
  export const topbarCss = read('styles/topbar.css');
27
27
 
28
- // Individual component stylesheets, addressable by name.
28
+ // Individual sheets; successPanel() needs both styles.callout and styles.success.
29
29
  export const styles = {
30
30
  base: baseCss,
31
31
  reducedMotion: read('styles/reduced-motion.css'),
@@ -181,14 +181,10 @@
181
181
  background: var(--glow-green); /* ring-gap: inherit — translucent wash retains the opaque containing gap. */
182
182
  }
183
183
  .ui-success__check {
184
+ --sx-green: var(--chip-success-ink);
184
185
  width: 48px; height: 48px;
185
- border-radius: 50%;
186
- background: var(--green);
187
- color: var(--signal-contrast);
188
- display: grid;
189
- place-items: center;
190
186
  margin: 0 auto 14px;
191
187
  }
192
- .ui-success__check svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; }
188
+ .ui-success__check .ui-sx__check { width: 100%; height: 100%; }
193
189
  .ui-success__title { color: var(--strong); font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-bottom: 5px; }
194
190
  .ui-success__sub { color: var(--text); font-size: var(--text-base); }
@@ -11,11 +11,13 @@
11
11
  * the foot. Markup comes from success() in components/index (re-exported).
12
12
  * ========================================================================== */
13
13
 
14
- .ui-sx {
15
- --sx-green: var(--green);
14
+ .ui-sx, .ui-success__check {
16
15
  --sx-tint: color-mix(in srgb, var(--green) 18%, transparent);
17
16
  --sx-track: color-mix(in srgb, var(--green) 32%, transparent);
17
+ }
18
18
 
19
+ .ui-sx {
20
+ --sx-green: var(--green);
19
21
  position: relative;
20
22
  overflow: hidden;
21
23
  border-radius: 20px;