@apliteni/apliteni-ui 0.142.5 → 0.142.6

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.6",
4
4
 
5
5
  "workspaces": [
6
6
  "react"
@@ -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" }),
@@ -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 --------------------- */