@apliteni/apliteni-ui 0.142.5 → 0.142.7

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.
@@ -8,11 +8,11 @@
8
8
 
9
9
  **Why:** Without a legend, readers need labels for unfamiliar glyphs.
10
10
 
11
- **Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme toggles, sidebar toggles and collapsed-rail links have separate approval.
11
+ **Except:** New entries require a decision and pass Earn a wordless button on Button labels. Allowed: close, copy, overflow, expand, collapse and export. Theme and sidebar toggles and collapsed-rail links have separate approval. On [#729](https://github.com/apliteni/apliteni-ui/issues/729), the owner chose a glyph-only React AppShell search trigger below 560px for one light row of icons. Its sentence stays the accessible name: phones have no hover title.
12
12
 
13
- **Do:** Show an overflow menu without words; keep the Settings label.
13
+ **Do:** A wordless overflow menu and a labelled Settings.
14
14
 
15
- **Don't:** Use a cog without words, even with a perfect `aria-label`.
15
+ **Don't:** A wordless cog, even with a perfect `aria-label`.
16
16
 
17
17
  ## State and action
18
18
 
@@ -20,9 +20,9 @@
20
20
 
21
21
  **Rule:** A circled glyph is a state; a bare glyph is an action.
22
22
 
23
- **Why:** Two meanings force readers to decide from context each time.
23
+ **Why:** Two meanings make readers guess from context.
24
24
 
25
- **Except:** Most glyphs show a thing, not a state or action, including `globe`, `database` and `layers`. The split guides component choice, not the catalogue.
25
+ **Except:** Most glyphs, such as `globe`, `database` and `layers`, show a thing, not a state or action. The split guides component choice only.
26
26
 
27
27
  **Do:** `circleX` reports the failure; the bare `x` closes the toast.
28
28
 
@@ -32,25 +32,25 @@
32
32
 
33
33
  <!-- rule: provenance -->
34
34
 
35
- **Rule:** Use the Lucide path unchanged, and state when a glyph name differs.
35
+ **Rule:** Use the Lucide path unchanged, and record any rename.
36
36
 
37
- **Why:** One source keeps the set consistent, and a recorded rename still traces back to it.
37
+ **Why:** One source keeps the set consistent, and a recorded rename stays traceable.
38
38
 
39
- **Except:** A brand mark with no Lucide original is allowed: `github` and `linkedin` are the vendor’s own marks and belong in BRAND.
39
+ **Except:** Vendor marks with no Lucide original, such as `github` and `linkedin`, are allowed in BRAND.
40
40
 
41
- **Do:** `circleCheck` is Lucide’s circle-check-big, path unchanged and name recorded.
41
+ **Do:** `circleCheck`: Lucide’s circle-check-big, same path, rename recorded.
42
42
 
43
- **Don't:** A redrawn path, or a rename nobody recorded.
43
+ **Don't:** A redrawn path or an unrecorded rename.
44
44
 
45
45
  ## Status stroke width
46
46
 
47
47
  <!-- rule: stroke-earns-the-bar -->
48
48
 
49
- **Rule:** Stroke a status glyph at 1.5 CSS px or wider, or require 4.5:1 text contrast instead of 3:1 graphic contrast.
49
+ **Rule:** Stroke a status glyph at 1.5 CSS px or wider, or use 4.5:1 text contrast, not 3:1.
50
50
 
51
- **Why:** Visible width is `stroke-width × box ÷ 24`; below 1.5 CSS px a stroke reads as a text stem and needs 4.5:1; above it, WCAG 1.4.11’s 3:1 graphic bar applies.
51
+ **Why:** Visible width is `stroke-width × box ÷ 24`. A thinner stroke reads as a text stem and needs 4.5:1. A wider one gets WCAG 1.4.11’s 3:1 graphic bar.
52
52
 
53
- **Except:** Non-status glyphs, such as close buttons and chevrons, have no five-status pair to measure; their control owns their contrast.
53
+ **Except:** Non-status glyphs, such as close buttons and chevrons, have no five-status pair. Their control owns their contrast.
54
54
 
55
55
  **Do:** A 1.5 CSS px stroke, held to 3:1.
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.142.5",
3
+ "version": "0.142.7",
4
4
 
5
5
  "workspaces": [
6
6
  "react"
@@ -229,7 +229,7 @@
229
229
  flex-direction: column;
230
230
  background: var(--bg-elevated);
231
231
  border: 0;
232
- box-shadow: var(--elev-drop);
232
+ box-shadow: inset 0 0 0 1px var(--modal-edge), var(--elev-drop);
233
233
  border-radius: var(--radius-md);
234
234
  overflow: hidden;
235
235
  transform: translateY(var(--space-2));
@@ -1060,11 +1060,15 @@
1060
1060
  }
1061
1061
  @media (max-width: 560px) {
1062
1062
  .ui-react-app .ui-app__bar {
1063
- gap: var(--space-1);
1063
+ gap: 0;
1064
1064
  padding-inline: var(--space-2);
1065
1065
  }
1066
+ .ui-react-app .ui-app__bar {
1067
+ --tap-clear-x: 0px;
1068
+ }
1066
1069
  .ui-react-app .ui-app__bar--phone {
1067
1070
  gap: var(--space-3);
1071
+ --tap-clear-x: var(--space-3);
1068
1072
  }
1069
1073
  .ui-react-app .ui-app__bar:not(:has(> .ui-app__menu:first-child)) {
1070
1074
  padding-inline-start: var(--space-4);
@@ -1072,40 +1076,70 @@
1072
1076
  .ui-react-app .ui-app__bar-gap {
1073
1077
  display: none;
1074
1078
  }
1075
- .ui-react-app .ui-app__search-ic {
1076
- display: none;
1079
+ .ui-react-app .ui-app__bar .ui-app__menu,
1080
+ .ui-react-app .ui-app__bar .ui-app__search,
1081
+ .ui-react-app .ui-app__bar .toggle,
1082
+ .ui-react-app .ui-app__bar .ui-app__user-trigger {
1083
+ flex: none;
1084
+ justify-content: center;
1085
+ width: 40px;
1086
+ min-width: 40px;
1087
+ height: 40px;
1088
+ min-height: 40px;
1089
+ padding: 0;
1090
+ margin: 0;
1091
+ border: 0;
1092
+ border-radius: var(--radius-md);
1093
+ background: transparent;
1094
+ }
1095
+ .ui-react-app .ui-app__bar .ui-app__search:hover,
1096
+ .ui-react-app .ui-app__bar .toggle:hover,
1097
+ .ui-react-app .ui-app__bar .ui-app__user-trigger:hover {
1098
+ transform: none;
1099
+ background: var(--surface);
1100
+ }
1101
+ .ui-react-app .ui-app__bar > .ui-app__brand--band {
1102
+ min-width: 40px;
1103
+ min-height: 40px;
1104
+ margin-inline-start: var(--space-1);
1105
+ }
1106
+ .ui-react-app .ui-app__user--bar {
1107
+ margin: 0;
1077
1108
  }
1078
1109
  .ui-react-app .ui-app__search {
1079
- flex: 1 1 auto;
1080
- min-width: 56px;
1081
- padding-inline: var(--space-2);
1110
+ order: 2;
1082
1111
  }
1083
- .ui-react-app__band-control {
1112
+ .ui-react-app .ui-app__search-ic {
1084
1113
  display: flex;
1085
- flex: 0 1 auto;
1086
- min-width: 56px;
1087
- max-width: min(108px, calc(100vw - 263px));
1088
1114
  }
1089
- .ui-react-app__band-control > .ui-btn,
1090
- .ui-react-app__band-control > .ui-dropdown,
1091
- .ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger {
1115
+ .ui-react-app__band-control > :first-child {
1116
+ order: 1;
1092
1117
  min-width: 0;
1093
- max-width: 100%;
1118
+ margin-inline: var(--space-1) auto;
1094
1119
  }
1095
- .ui-react-app__band-control > .ui-btn {
1096
- min-height: 34px;
1120
+ .ui-react-app__band-control > :not(:first-child) {
1121
+ order: 3;
1097
1122
  }
1098
- .ui-react-app .ui-app__bar .toggle {
1099
- margin-inline-start: 2px;
1123
+ .ui-react-app .ui-app__bar:not(:has(.ui-react-app__band-control)) .ui-app__search {
1124
+ margin-inline-start: auto;
1100
1125
  }
1101
- .ui-react-app .ui-app__bar:not(.ui-app__bar--phone) > .ui-app__menu + .ui-app__brand--band {
1102
- margin-inline-start: 1px;
1126
+ .ui-react-app .ui-app__bar .toggle {
1127
+ order: 4;
1103
1128
  }
1104
1129
  .ui-react-app .ui-app__user--bar {
1105
- margin-inline-start: 2px;
1130
+ order: 5;
1106
1131
  }
1107
- .ui-react-app .ui-app__user-trigger {
1108
- min-width: 44px;
1132
+ .ui-react-app__band-control > .ui-btn,
1133
+ .ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger {
1134
+ min-height: 40px;
1135
+ }
1136
+ .ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger {
1137
+ max-width: 100%;
1138
+ border-color: transparent;
1139
+ background: transparent;
1140
+ }
1141
+ .ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger:hover {
1142
+ background: var(--surface);
1109
1143
  }
1110
1144
  .ui-react-app__band-control > .ui-btn .ui-btn__label,
1111
1145
  .ui-react-app__band-control .ui-dropdown__text {
@@ -1121,30 +1155,9 @@
1121
1155
  }
1122
1156
  }
1123
1157
  @container (max-width: 373px) {
1124
- .ui-react-app .ui-app__search {
1125
- flex: none;
1126
- justify-content: center;
1127
- width: 34px;
1128
- height: 34px;
1129
- min-width: 0;
1130
- padding: 0;
1131
- border-radius: 10px;
1132
- }
1133
- .ui-react-app .ui-app__search-ic {
1134
- display: flex;
1135
- }
1136
- .ui-react-app .ui-app__search-short {
1137
- display: none;
1138
- }
1139
1158
  .ui-react-app .ui-app__bar > .ui-app__brand--band {
1140
1159
  display: none;
1141
1160
  }
1142
- .ui-react-app__band-control {
1143
- max-width: 108px;
1144
- }
1145
- .ui-react-app .ui-app__bar .toggle {
1146
- margin-inline-start: auto;
1147
- }
1148
1161
  }
1149
1162
 
1150
1163
  /* src/AuthShell.css */
@@ -931,9 +931,10 @@ type AppShellProps = {
931
931
  lede?: string;
932
932
  actions?: ReactNode;
933
933
  bandControl?: ReactNode;
934
- /** The band trigger's words. Below 560px the shell draws `searchShortLabel` instead;
935
- * both stay the button's name, which does not change with the viewport. */
934
+ /** The band trigger's words and its name at every width. Below 560px the trigger shows
935
+ * only its glyph (#729), and the words stay its accessible name. */
936
936
  searchLabel?: string;
937
+ /** @deprecated Not drawn since #729: the phone trigger shows only its glyph. */
937
938
  searchShortLabel?: string;
938
939
  account: {
939
940
  name: string;
@@ -946,7 +947,7 @@ type AppShellProps = {
946
947
  /** Spread linkProps onto the router link, including children and onClick. */
947
948
  renderLink?: (section: AppShellSection, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
948
949
  };
949
- declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, crumbs, lede, actions, bandControl, account, onSignOut, searchLabel, searchShortLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
950
+ declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, crumbs, lede, actions, bandControl, account, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
950
951
 
951
952
  type AuthShellProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
952
953
  brand: ReactNode;
@@ -4386,7 +4386,6 @@ function AppShell({
4386
4386
  account,
4387
4387
  onSignOut,
4388
4388
  searchLabel = "Search or run a command\u2026",
4389
- searchShortLabel = "Search",
4390
4389
  defaultCollapsed = false,
4391
4390
  palette,
4392
4391
  renderLink
@@ -4568,7 +4567,6 @@ function AppShell({
4568
4567
  /* @__PURE__ */ jsxs34("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
4569
4568
  /* @__PURE__ */ jsx39("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx39(Icon, { name: "search" }) }),
4570
4569
  /* @__PURE__ */ jsx39("span", { className: "ui-app__search-txt", children: searchLabel }),
4571
- /* @__PURE__ */ jsx39("span", { className: "ui-app__search-short", "aria-hidden": "true", children: searchShortLabel }),
4572
4570
  /* @__PURE__ */ jsx39("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
4573
4571
  ] }),
4574
4572
  /* @__PURE__ */ jsx39("span", { className: "ui-app__bar-gap" }),
@@ -1,12 +1,12 @@
1
1
  /* ============================================================================
2
- * Card — .ui-card (a filled surface one step off the page: edged in dark, dropped in light)
2
+ * Card — .ui-card (a filled surface one step off the page: edged in both themes)
3
3
  * Rows: .ui-card__row / headers: .ui-card__title / .ui-card__sub
4
4
  * ========================================================================== */
5
5
 
6
- /* The surface is the step; what makes it legible depends on the theme. Dark edges the
7
- card with the hairline (--card-edge). Light draws no line at all and casts --elev-rest
8
- instead — a 22px penumbra off a 10px offset, the width Artur's reference uses on a
9
- card. Chosen by him on #490 round t3. why: docs/foundations.md#elevation */
6
+ /* The surface is the step; the line makes it legible. Both themes edge the card with
7
+ --card-edge: the hairline in dark, --level-line in light. Light also casts --elev-rest,
8
+ a faint short shadow. Dark casts nothing. Decided on #730.
9
+ why: docs/foundations.md#elevation */
10
10
  .ui-card {
11
11
  --ui-card-ground: var(--surface); /* the ground a scrolling row inside covers its edge with; a tint repeats it below */
12
12
  background: var(--surface);
@@ -28,8 +28,8 @@
28
28
  .ui-app-page .topbar { position: sticky; top: 0; z-index: var(--z-sticky); }
29
29
 
30
30
  /* The rail uses the card surface so its labels stay on a reading ground.
31
- Dark keeps its edge (--rail-edge); light casts --elev-rail, sideways, because the rail
32
- is flush to a screen edge. Reopens the light half of #454.
31
+ Both themes draw its edge (--rail-edge); light also casts a faint --elev-rail, sideways,
32
+ because the rail is flush to a screen edge. Decided on #730.
33
33
  why: docs/foundations.md#elevation
34
34
  overflow-y, because the box is pinned at the viewport's height for the whole
35
35
  scroll of .ui-app — without it a row past that height paints below the fold
@@ -402,11 +402,6 @@
402
402
  .ui-app__search-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
403
403
  /* The other half of the name, so it never gives way. */
404
404
  .ui-app__search kbd { flex: none; }
405
- /* The one word the phone band draws instead of the sentence. Above 560px the
406
- sentence fits and this is a second copy of it, so it is not drawn.
407
- why: docs/components.md#the-page-shell */
408
- .ui-app__search-short { display: none; }
409
-
410
405
  /* The mark alone — no room for two lines on a 52px row. No rule over it, since the
411
406
  band's hairline is under the whole of it, and no column, since this is not the rail.
412
407
  why: docs/components.md#the-page-shell */
@@ -555,8 +550,8 @@
555
550
 
556
551
  /* -- The band's search at one column --------------------------------------- */
557
552
  /* The band holds the trigger, the reader's mark and whatever the page puts between
558
- them, so the sentence broke mid-word — "Search or run a co…". The short word takes
559
- its place. Neither the sentence nor the cap is `display: none`: both are inside
553
+ them, so the sentence broke mid-word — "Search or run a co…". The search glyph takes
554
+ its place (#729). Neither the sentence nor the cap is `display: none`: both are inside
560
555
  the button's accessible name — the cap by Artur's call on #308 — so they are
561
556
  clipped the way `.ui-sr` in loading.css clips, and the name holds at every width.
562
557
  why: docs/components.md#the-page-shell */
@@ -573,9 +568,6 @@
573
568
  white-space: nowrap;
574
569
  border: 0;
575
570
  }
576
- /* It gives way before the band does: at a large font scale the word ellipsises
577
- rather than pushing the reader's mark off the row. */
578
- .ui-app__search-short { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
579
571
  }
580
572
 
581
573
  /* -- Auth card (sign-in / consent) — centered, glowing --------------------- */
@@ -593,7 +585,7 @@
593
585
  width: 100%;
594
586
  max-width: var(--panel-md);
595
587
  /* Floats over a spotlit page, so it takes the floating step and the floating
596
- treatment: the two-step edge in dark, the drop alone in light.
588
+ treatment: the two-step edge in dark, one line and the drop in light.
597
589
  why: docs/foundations.md#elevation */
598
590
  background: var(--bg-elevated);
599
591
  border: 1px solid var(--float-edge);
@@ -162,12 +162,13 @@
162
162
 
163
163
  /* WHICH EDGE EACH LEVEL DRAWS. One name per level, so a sheet never has to ask
164
164
  which theme it is in. Dark answers all four with the hairline, because a drop
165
- on a near-black page reaches 1.20 at its core and has nowhere else to go —
166
- light answers them with the drop instead. why: docs/foundations.md#elevation */
165
+ on a near-black page reaches 1.20 at its core and has nowhere else to go.
166
+ Light draws one line and adds a faint short drop. why: docs/foundations.md#elevation */
167
167
  --card-edge: var(--border); /* a card */
168
168
  --rail-edge: var(--border); /* the shell's rail */
169
169
  --float-edge: var(--border-strong); /* a floating surface, outer line */
170
170
  --float-edge-inner: var(--border); /* a floating surface, inner line */
171
+ --modal-edge: transparent; /* the modal: the deep scrim is its edge */
171
172
 
172
173
  /* Fields use the card surface and an edge in both themes. why: docs/foundations.md#elevation */
173
174
  --field-bg: var(--surface);
@@ -377,16 +378,15 @@
377
378
  --border: #e4e7ee;
378
379
  --border-strong: #cdd2dc;
379
380
 
380
- /* Light draws a LEVEL with a drop and no line at all. Decided by Artur on the
381
- #490 triage round t3: "It's better" — the soft shadow over the hairline, against
382
- the reference he supplied. A line divides two regions of ONE surface (a card's
383
- rows, a table's rules, the rail's head band, the topbar); a drop says a surface
384
- is HIGHER, and only a higher surface may cast one.
381
+ /* Light draws each LEVEL with one line and a faint short shadow. The line is half
382
+ way between --border and --border-strong. Decided on #730.
385
383
  why: docs/foundations.md#elevation */
386
- --card-edge: transparent;
387
- --rail-edge: transparent;
388
- --float-edge: transparent;
384
+ --level-line: color-mix(in srgb, var(--border) 50%, var(--border-strong));
385
+ --card-edge: var(--level-line);
386
+ --rail-edge: var(--level-line);
387
+ --float-edge: var(--level-line);
389
388
  --float-edge-inner: transparent;
389
+ --modal-edge: var(--float-edge);
390
390
 
391
391
  /* Light draws a field with its EDGE, because since #448 it has no well left to draw it
392
392
  with: a card and a panel are both white, the sunken step falls two rungs under either,
@@ -485,18 +485,18 @@
485
485
  /* THE LIGHT LADDER. Three rungs, each two layers: a wide faint one and a short one.
486
486
  Each layer is offset on one axis, blurred at least twice as wide as it is offset,
487
487
  and held in by a negative spread. None is a glow — a glow is a zero-offset layer of
488
- the signal's own colour. A level with no line casts a rung that reaches on every
489
- side it exposes, which is why the wide layer's offset stays under half its blur.
488
+ the signal's own colour. Each rung is short and faint, because the level's line
489
+ marks the edge and the rung only adds lift. Decided on #730.
490
490
  why: docs/foundations.md#elevation */
491
491
  --elev-rest:
492
- 0 2px 26px -3px color-mix(in srgb, var(--shadow-ink) 9%, transparent),
493
- 0 1px 3px -1px color-mix(in srgb, var(--shadow-ink) 7%, transparent);
492
+ 0 2px 6px -1px color-mix(in srgb, var(--shadow-ink) 6%, transparent),
493
+ 0 1px 3px -1px color-mix(in srgb, var(--shadow-ink) 4%, transparent);
494
494
  --elev-rail:
495
- 10px 0 24px -14px color-mix(in srgb, var(--shadow-ink) 16%, transparent),
496
- 1px 0 3px -1px color-mix(in srgb, var(--shadow-ink) 7%, transparent);
495
+ 3px 0 8px -3px color-mix(in srgb, var(--shadow-ink) 6%, transparent),
496
+ 1px 0 3px -1px color-mix(in srgb, var(--shadow-ink) 4%, transparent);
497
497
  --elev-drop:
498
- 0 20px 46px -16px color-mix(in srgb, var(--shadow-ink) 22%, transparent),
499
- 0 1px 14px -4px color-mix(in srgb, var(--shadow-ink) 12%, transparent);
498
+ 0 12px 32px -12px color-mix(in srgb, var(--shadow-ink) 16%, transparent),
499
+ 0 1px 8px -3px color-mix(in srgb, var(--shadow-ink) 9%, transparent);
500
500
 
501
501
  --scrim: rgba(20, 22, 40, 0.38);
502
502