@gemboss/ui 0.64.0 → 0.66.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +213 -1
  2. package/README.md +67 -5
  3. package/catalog/editor.html +21 -13
  4. package/catalog/index.html +4 -4
  5. package/gemboss-ui.css +3 -3
  6. package/package.json +8 -1
  7. package/parts/components.css +2 -2
  8. package/parts/core.css +1 -1
  9. package/parts/shell.css +1 -1
  10. package/src/auth.tsx +1 -15
  11. package/src/confirm-buttons.ts +35 -0
  12. package/src/confirm-dialog.css +1 -0
  13. package/src/confirm-dialog.tsx +124 -0
  14. package/src/create-shell.css +1 -1
  15. package/src/create-shell.tsx +7 -4
  16. package/src/dialog.css +1 -0
  17. package/src/dialog.tsx +46 -7
  18. package/src/editor/color-choices.ts +9 -0
  19. package/src/editor/controls.tsx +59 -19
  20. package/src/editor/field-control.tsx +456 -0
  21. package/src/editor/field-frame.tsx +192 -0
  22. package/src/editor/field-spec.ts +346 -0
  23. package/src/editor/index.ts +20 -2
  24. package/src/editor/label-side.ts +9 -3
  25. package/src/editor/panel.tsx +39 -12
  26. package/src/editor/secret-field.tsx +116 -0
  27. package/src/editor-color.css +1 -1
  28. package/src/editor-plain.js +1 -1
  29. package/src/editor.css +1 -1
  30. package/src/email-editor/editor.tsx +37 -9
  31. package/src/email-editor/model.ts +5 -1
  32. package/src/email-editor.css +1 -1
  33. package/src/eye-icon.tsx +14 -0
  34. package/src/gem-at-work.css +1 -1
  35. package/src/gem-at-work.ts +223 -11
  36. package/src/gemboss-field.css +1 -1
  37. package/src/icons-plain.js +1 -0
  38. package/src/icons.tsx +9 -0
  39. package/src/index.ts +4 -1
  40. package/src/kit-plain.css +1 -1
  41. package/src/list-page.css +1 -1
  42. package/src/list-page.tsx +181 -55
  43. package/src/list-toolbar.css +1 -0
  44. package/src/list-toolbar.tsx +85 -0
  45. package/src/menu-keys.ts +3 -1
  46. package/src/search-dialog.tsx +4 -1
  47. package/src/segmented.tsx +21 -5
  48. package/src/service-switcher.tsx +2 -2
  49. package/src/settings-dialog.tsx +2 -2
  50. package/src/ui.css +1 -1
package/src/icons.tsx CHANGED
@@ -88,6 +88,15 @@ const P = {
88
88
  panelRight: <><rect x="3" y="3.5" width="14" height="13" rx="2" /><path d="M12.5 3.5v13" /></>,
89
89
  // The composer's emoji button (21/10/2026): `reaction`'s face, closed and without the plus (it writes, it does not react).
90
90
  emoji: <><circle cx="10" cy="10" r="6.5" /><path d="M7.5 11.8s.9 1.2 2.5 1.2 2.5-1.2 2.5-1.2" /><path d="M7.8 8.2h.01M12.2 8.2h.01" /></>,
91
+ // GemNews' side rail and widget panel (09/11/2026, icons-plain.js): move a widget up (`chevronDown` turned over), a saved
92
+ // article, Winning Products, Hot News, a row you can drag, a holiday countdown, a goal.
93
+ chevronUp: <path d="M6 12l4-4 4 4" />,
94
+ bookmark: <path d="M5.5 3.5h9v13l-4.5-3.2-4.5 3.2z" />,
95
+ trophy: <><path d="M6.5 3.5h7v3.8a3.5 3.5 0 0 1-7 0z" /><path d="M6.5 5H4.5v1.2a2.3 2.3 0 0 0 2.6 2.3M13.5 5h2v1.2a2.3 2.3 0 0 1-2.6 2.3" /><path d="M10 10.8v2.7M7 16.5h6l-.6-3H7.6z" /></>,
96
+ flame: <><path d="M10 17c-2.9 0-5-2-5-4.9 0-2.5 1.7-3.9 2.6-5.8.5 1.3 1.2 2.1 2.1 2.4.1-2.3 1.2-4.2 2.4-5.7.7 2.6 2.9 4.5 2.9 8.7 0 3.1-2.1 5.3-5 5.3z" /><path d="M10 17c-1.2 0-2.1-.9-2.1-2.1 0-1.2.9-1.9 1.4-2.8.8 1 2.8 1.6 2.8 2.8 0 1.2-.9 2.1-2.1 2.1z" /></>,
97
+ grip: <><circle cx="7.5" cy="5" r="1" /><circle cx="12.5" cy="5" r="1" /><circle cx="7.5" cy="10" r="1" /><circle cx="12.5" cy="10" r="1" /><circle cx="7.5" cy="15" r="1" /><circle cx="12.5" cy="15" r="1" /></>,
98
+ timer: <><path d="M5.5 3h9M5.5 17h9" /><path d="M6.5 3c0 3.5 3.5 4.5 3.5 7s-3.5 3.5-3.5 7M13.5 3c0 3.5-3.5 4.5-3.5 7s3.5 3.5 3.5 7" /></>,
99
+ target: <><circle cx="10" cy="10" r="7" /><circle cx="10" cy="10" r="4" /><circle cx="10" cy="10" r="1" /></>,
91
100
  } satisfies Record<string, React.ReactNode>;
92
101
  // `satisfies`, not a `Record<string, …>` annotation: the annotation widened `keyof` to `string`, so a
93
102
  // typo (`name="setings"`) type-checked and drew an empty box (review #3474).
package/src/index.ts CHANGED
@@ -58,6 +58,9 @@ export { Icon, ICON_NAMES, type IconName } from "./icons";
58
58
  export { AssistantLauncher } from "./launcher";
59
59
  export { Avatar, avatarTone, Leaderboard, Podium, TopbarNav, type AvatarSize, type LeaderRow, type TopbarNavItem } from "./portal";
60
60
  export { Dialog } from "./dialog";
61
+ export { ConfirmDialog, useConfirmAsk, type ConfirmDialogProps } from "./confirm-dialog";
62
+ // 09/11/2026: the row over a list (search, selects, view, tools), one control set row 8: its own module and entry.
63
+ export { ListToolbar, type ListToolbarProps, type ListToolbarSelect } from "./list-toolbar";
61
64
  export { Sheet, type SheetProps } from "./sheet";
62
65
  export { ReaderDialog, type ReaderDialogProps } from "./reader-dialog";
63
66
  export { SettingsDialog, type SettingsDialogProps, type SettingsSectionItem } from "./settings-dialog";
@@ -85,7 +88,7 @@ export { GemHolo } from "./gem-holo";
85
88
  export { StartingPoint, type StartingArt, type StartingDoor } from "./starting-point";
86
89
  export { EmptyStage } from "./empty-stage";
87
90
  // Step 3 of the list standard (23/10/2026): the frame of a list page, its header, notices, toolbar and one card with the list or its state.
88
- export { ListPage, type ListPageAction, type ListPageChoice, type ListPageState } from "./list-page";
91
+ export { ListPage, PageActions, type ListPageAction, type ListPageChoice, type ListPageState } from "./list-page";
89
92
  export { PageTabs, PageTabsContext } from "./page-tabs";
90
93
  // After step 3f (24/10/2026): the numbered pager (ui-pager) as a React component, links or buttons.
91
94
  export { Pager, pageWindow, type PagerProps } from "./pager";
package/src/kit-plain.css CHANGED
@@ -1 +1 @@
1
- .ui-check{display:inline-flex;align-items:center;gap:var(--ui-space-2);min-height:44px;max-width:100%;overflow-wrap:break-word;cursor:pointer;font-size:var(--ui-fs-body);color:var(--ui-text)}.ui-check>input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--ui-accent);cursor:inherit}.ui-check>input:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}.ui-check:has(>input:disabled){opacity:.5;cursor:not-allowed}.ui-check>:last-child:not(input){min-width:0}.ui-label{display:block;margin:0 0 var(--ui-space-1);font-size:var(--ui-fs-caption);font-weight:600;color:var(--ui-text-muted)}.ui-kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--ui-space-2) var(--ui-space-4);margin:0;font-size:var(--ui-fs-body)}.ui-kv>dt{color:var(--ui-text-muted)}.ui-kv>dd{margin:0;min-width:0;overflow-wrap:anywhere;color:var(--ui-text)}.ui-link,.ui-prose :where(a:not([class])){color:var(--gemboss-accent-strong, #3a44de);text-decoration:underline;text-decoration-thickness:from-font;text-underline-offset:2px}.ui-link:visited,.ui-prose :where(a:not([class])):visited{color:var(--gemboss-accent-strong, #3a44de)}.ui-link:hover,.ui-prose :where(a:not([class])):hover{color:var(--gemboss-accent, #5661f5);text-decoration-thickness:2px}.ui-link:focus-visible,.ui-prose :where(a:not([class])):focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:2px}.ui-card--media{position:relative;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-card__link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:650;text-decoration:none;overflow-wrap:anywhere}.ui-card__link:after{content:"";position:absolute;inset:0;z-index:0}.ui-card__link:focus-visible{outline:none}.ui-card--media:has(.ui-card__link){cursor:pointer}.ui-card--media:has(.ui-card__link:hover){border-color:var(--ui-text-muted)}.ui-card--media:has(.ui-card__link:focus-visible){outline:2px solid var(--ui-focus);outline-offset:1px}.ui-card--media :is(.ui-card__foot button,.ui-card__foot a,.ui-card__body a:not(.ui-card__link),.ui-card__body button,select,input,summary){position:relative;z-index:1}.ui-card__menu{position:absolute;top:8px;right:8px;z-index:2}.ui-card--media:has(>.ui-card__menu){overflow:visible}.ui-card--media:has(>.ui-card__menu)>.ui-card__media{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}.ui-card__meta{color:var(--ui-text-muted);font-size:var(--ui-fs-caption);line-height:16px}.ui-card--media[data-ratio="4/3"]>.ui-card__media{aspect-ratio:4 / 3}.ui-card--media[data-ratio="1/1"]>.ui-card__media{aspect-ratio:1 / 1}.ui-card__media{display:block;width:100%;aspect-ratio:16 / 10;margin:0;padding:0;border:0;border-bottom:1px solid var(--ui-border);background:var(--ui-surface-2);overflow:hidden;color:inherit}.ui-card__media>img{display:block;width:100%;height:100%;object-fit:cover}button.ui-card__media,a.ui-card__media{cursor:pointer}.ui-card__media:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:-2px}.ui-card__body{display:grid;justify-items:start;gap:var(--ui-space-2, 8px);padding:var(--ui-space-3, 12px) var(--ui-space-4, 16px);min-width:0}.ui-card__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ui-space-2, 8px);margin-top:auto;padding:0 var(--ui-space-4, 16px) var(--ui-space-3, 12px);color:var(--ui-text-muted);font-size:var(--ui-fs-caption, 13px)}.ui-overlay>.ui-modal{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}.ui-modal>.ui-modal__head,.ui-modal>.ui-modal__foot{flex:none}.ui-modal>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}.ui-delta{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:2px;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-text-muted);font-variant-numeric:tabular-nums}.ui-delta--good{color:var(--ui-success-fg)}.ui-delta--bad{color:var(--ui-danger-fg)}.ui-metrics--grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:var(--ui-space-3);margin:0}.ui-metric--lg{gap:4px;padding:var(--ui-space-3) var(--ui-space-4)}.ui-metric--lg .ui-metric__val{font-size:24px;line-height:32px}.ui-metric--lg .ui-metric__lbl{order:-1;font-size:var(--ui-fs-body)}.ui-metric__foot{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}@media (max-width: 520px){.ui-metrics--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.ui-funnel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--ui-space-2);margin:0;padding:0;list-style:none}.ui-funnel>li{position:relative;display:flex;flex-direction:column;gap:2px;padding:var(--ui-space-3);border-radius:var(--ui-radius-md);background:var(--ui-surface-2);min-width:0}.ui-funnel__val{font-size:20px;font-weight:700;color:var(--ui-text);font-variant-numeric:tabular-nums;line-height:24px}.ui-funnel__lbl{font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted);overflow-wrap:anywhere}.ui-funnel__rate{order:-1;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-series-1);font-variant-numeric:tabular-nums}@media (max-width: 520px){.ui-funnel{grid-auto-flow:row}}.ui-grid{display:grid;gap:var(--ui-space-4);align-items:start}.ui-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width: 1100px){.ui-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 960px){.ui-grid--2{grid-template-columns:minmax(0,1fr)}}@media (max-width: 720px){.ui-grid--3{grid-template-columns:minmax(0,1fr)}}.ui-section-head{margin:var(--ui-space-4) 0 0}.ui-section-head>h2{margin:0;font-size:14px;line-height:20px;font-weight:650;color:var(--ui-text)}.ui-section-head>p{margin:2px 0 0;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}.ui-seg{max-width:100%;overflow-x:auto}.ui-seg :is(button,a).is-text{flex:none;white-space:nowrap}@media (max-width: 360px){.ui-seg :is(button,a).is-text{padding:0 9px}}.ui-btn--critical{color:var(--gemboss-danger-strong)}.ui-btn--critical:hover{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.ui-btn--primary.ui-btn--critical{background:var(--gemboss-danger);border-color:var(--gemboss-danger);color:var(--gemboss-on-primary)}.ui-btn--primary.ui-btn--critical:hover{background:var(--gemboss-danger-strong);border-color:var(--gemboss-danger-strong);color:var(--gemboss-on-primary)}.ui-btn--critical:focus-visible{outline-color:var(--gemboss-danger-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn,.ui-btn.ui-btn--sm,.ui-select.ui-select{min-height:44px}.ui-btn--icon.ui-btn--sm{min-width:44px}.ui-seg :is(button,a){height:44px}}.ui-badge--success{background:var(--gemboss-success-soft);color:var(--gemboss-success-strong)}.ui-badge--warning{background:var(--gemboss-warning-soft);color:var(--gemboss-warning)}.ui-badge--critical{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.ui-badge--info{background:var(--gemboss-accent-soft);color:var(--gemboss-accent-strong)}.ui-badge--dot:before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:currentColor}.ui-banner{--ui-banner-bg: var(--ui-surface-2);--ui-banner-fg: var(--ui-text);border-radius:var(--ui-radius-lg);overflow:hidden;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 0 0 1px var(--ui-border),0 3px 1px -1px #1a1a1a12;font-size:var(--ui-fs-body);line-height:20px}.ui-banner--success{--ui-banner-bg: var(--gemboss-success-soft);--ui-banner-fg: var(--gemboss-success-strong)}.ui-banner--warning{--ui-banner-bg: var(--gemboss-warning-soft);--ui-banner-fg: var(--gemboss-warning)}.ui-banner--critical{--ui-banner-bg: var(--gemboss-danger-soft);--ui-banner-fg: var(--gemboss-danger-strong)}.ui-banner--info{--ui-banner-bg: var(--gemboss-accent-soft);--ui-banner-fg: var(--gemboss-accent-strong)}.ui-banner__head{display:flex;align-items:center;gap:var(--ui-space-2);min-height:32px;padding:6px var(--ui-space-3);background:var(--ui-banner-bg);color:var(--ui-banner-fg)}.ui-banner__icon{flex:none;width:20px;height:20px;fill:currentColor}.ui-banner__title{flex:1 1 auto;min-width:0;margin:0;font-size:var(--ui-fs-body);font-weight:650;line-height:20px}.ui-banner__close{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px -8px -6px 0;border:0;border-radius:var(--ui-radius-md);background:transparent;color:inherit;cursor:pointer}.ui-banner__close:hover{background:color-mix(in srgb,currentColor 10%,transparent)}.ui-banner__close:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-banner__close svg{width:16px;height:16px}.ui-banner__body{padding:var(--ui-space-3) var(--ui-space-4)}.ui-banner__body>:first-child{margin-top:0}.ui-banner__body>:last-child{margin-bottom:0}.ui-banner__actions{display:flex;flex-wrap:wrap;gap:var(--ui-space-2);margin-top:var(--ui-space-3)}@media (pointer: coarse),(max-width: 47.9975em){.ui-banner__close{width:44px;height:44px;margin:-12px -12px -12px 0}}.ui-help{margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--ui-text-muted)}.ui-error:empty{display:none}.ui-error{display:flex;gap:6px;margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--gemboss-danger-strong)}.ui-error:before{content:"";flex:none;width:16px;height:16px;margin-top:2px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat}.gemboss-field[aria-invalid=true],.gemboss-field--group:has([aria-invalid=true]),.ui-select[aria-invalid=true],.ui-textarea[aria-invalid=true]{border-color:var(--gemboss-danger-strong);background-color:var(--gemboss-danger-soft)}.ui-choices{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0;padding:0;border:0;min-width:0}.ui-choices>legend{padding:0}.ui-switch>input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;width:32px;height:20px;margin:0;border-radius:var(--gemboss-radius-full);background:var(--gemboss-field-line);transition:background-color var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--gemboss-surface);box-shadow:0 1px 2px #0003;transition:transform var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:checked{background:var(--ui-accent)}.ui-switch>input[type=checkbox]:checked:before{transform:translate(12px)}@media (prefers-reduced-motion: reduce){.ui-switch>input[type=checkbox],.ui-switch>input[type=checkbox]:before{transition:none}}.ui-tooltip{position:relative;display:inline-flex}.ui-tooltip__bubble{position:absolute;z-index:30;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);width:max-content;max-width:240px;padding:4px 8px;border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:450;box-shadow:0 8px 16px -4px #1a1a1a38,0 0 0 1px var(--ui-border);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--gemboss-transition-fast) ease}.ui-tooltip--end .ui-tooltip__bubble{left:auto;right:0;transform:none}.ui-tooltip:hover>.ui-tooltip__bubble,.ui-tooltip:focus-within>.ui-tooltip__bubble{opacity:1;visibility:visible}.ui-spinner{display:inline-block;flex:none;width:20px;height:20px;box-sizing:border-box;border-radius:50%;border:2px solid color-mix(in srgb,var(--ui-text) 18%,transparent);border-top-color:var(--ui-text);animation:ui-spin .7s linear infinite;vertical-align:middle}.ui-spinner--lg{width:44px;height:44px;border-width:4px}@keyframes ui-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.ui-spinner{animation-duration:2s}}.ui-progress{appearance:none;-webkit-appearance:none;display:block;width:100%;height:8px;border:0;border-radius:var(--gemboss-radius-full);overflow:hidden;background:var(--gemboss-divider);color:var(--ui-accent)}.ui-progress::-webkit-progress-bar{background:var(--gemboss-divider);border-radius:inherit}.ui-progress::-webkit-progress-value{background:currentColor;border-radius:inherit}.ui-progress::-moz-progress-bar{background:currentColor;border-radius:inherit}.ui-progress--success{color:var(--gemboss-success)}.ui-progress--critical{color:var(--gemboss-danger)}.ui-modal--wide{width:min(620px,100%)}dialog.ui-modal{padding:0;max-width:calc(100% - 40px);max-height:calc(100dvh - 40px);color:var(--ui-text)}dialog.ui-modal[open]{display:flex;flex-direction:column}dialog.ui-modal::backdrop{background:#00000080}html:has(dialog.ui-modal:modal){overflow:hidden}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn.ui-btn--sm{min-width:44px}}.ui-badge--wrap{white-space:normal;overflow-wrap:anywhere;line-height:16px}.ui-page-head--actions{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 16px}.ui-page-head--actions>:first-child{min-width:0}.ui-page-head__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-2)}.ui-chips>button.ui-tag--chip{min-height:28px;padding:4px 12px;border-radius:var(--ui-radius-md, 8px);cursor:pointer;font-family:inherit;font-size:var(--gemboss-fs-caption, 12px);color:var(--ui-text)}.ui-chips>button.ui-tag--chip:hover{background:var(--ui-surface-2);border-color:var(--ui-text-muted)}.ui-chips>button.ui-tag--chip:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.ui-chips>button.ui-tag--chip[aria-pressed=true]{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-accent-strong);font-weight:600}@media (pointer: coarse),(max-width: 47.9975em){.ui-chips>button.ui-tag--chip{min-height:44px;min-width:44px;justify-content:center}}@media (max-width: 47.9975em){.gemboss-ec-input.gemboss-ec-input textarea{font-size:16px}}:is(.gemboss-field,.ui-textarea)[readonly][readonly]{background:var(--ui-surface-2);border-color:var(--ui-border);cursor:default}.ui-modal>form{display:contents}.ui-modal>form>.ui-modal__head,.ui-modal>form>.ui-modal__foot{flex:none}.ui-modal>form>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}button.ui-metric{font:inherit;text-align:left;color:inherit;cursor:pointer}button.ui-metric:hover{border-color:var(--ui-text-muted)}button.ui-metric:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-metric.ui-metric:is([aria-pressed=true],[aria-current=page]){border-color:var(--gemboss-accent);box-shadow:inset 0 0 0 1px var(--gemboss-accent)}.ui-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;padding:16px 0;color:var(--ui-text-muted);font-size:var(--ui-fs-body);text-align:center}.ui-more[hidden]{display:none}.ui-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:var(--ui-btn-h, 28px);padding:0 12px;border:1px dashed var(--ui-border);border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font:inherit;font-size:var(--ui-fs-caption);font-weight:550;line-height:16px;white-space:nowrap;text-decoration:none;cursor:pointer}.ui-chip:hover{border-style:solid;background:var(--ui-surface-2)}.ui-chip:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-chip:is([aria-pressed=true],[aria-current=page],[aria-current=true]){border-style:solid;border-color:var(--ui-accent);background:var(--ui-accent-soft);color:var(--ui-accent-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-chip{height:auto;min-height:44px;min-width:44px}}.ui-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--ui-space-4)}.ui-stack--tight{gap:var(--ui-space-2)}
1
+ .ui-check{display:inline-flex;align-items:center;gap:var(--ui-space-2);min-height:44px;max-width:100%;overflow-wrap:break-word;cursor:pointer;font-size:var(--ui-fs-body);color:var(--ui-text)}.ui-check>input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--ui-accent);cursor:inherit}.ui-check>input:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}.ui-check:has(>input:disabled){opacity:.5;cursor:not-allowed}.ui-check>:last-child:not(input){min-width:0}.ui-label{display:block;margin:0 0 var(--ui-space-1);font-size:var(--ui-fs-caption);font-weight:600;color:var(--ui-text-muted)}.ui-kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--ui-space-2) var(--ui-space-4);margin:0;font-size:var(--ui-fs-body)}.ui-kv>dt{color:var(--ui-text-muted)}.ui-kv>dd{margin:0;min-width:0;overflow-wrap:anywhere;color:var(--ui-text)}.ui-link,.ui-prose :where(a:not([class])){color:var(--gemboss-accent-strong, #3a44de);text-decoration:underline;text-decoration-thickness:from-font;text-underline-offset:2px}.ui-link:visited,.ui-prose :where(a:not([class])):visited{color:var(--gemboss-accent-strong, #3a44de)}.ui-link:hover,.ui-prose :where(a:not([class])):hover{color:var(--gemboss-accent, #5661f5);text-decoration-thickness:2px}.ui-link:focus-visible,.ui-prose :where(a:not([class])):focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:2px}.ui-card--media{position:relative;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-card__link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:650;text-decoration:none;overflow-wrap:anywhere}.ui-card__link:after{content:"";position:absolute;inset:0;z-index:0}.ui-card__link:focus-visible{outline:none}.ui-card--media:has(.ui-card__link){cursor:pointer}.ui-card--media:has(.ui-card__link:hover){border-color:var(--ui-text-muted)}.ui-card--media:has(.ui-card__link:focus-visible){outline:2px solid var(--ui-focus);outline-offset:1px}.ui-card--media :is(.ui-card__foot button,.ui-card__foot a,.ui-card__body a:not(.ui-card__link),.ui-card__body button,select,input,summary){position:relative;z-index:1}.ui-card__menu{position:absolute;top:8px;right:8px;z-index:2}.ui-card--media:has(>.ui-card__menu){overflow:visible}.ui-card--media:has(>.ui-card__menu)>.ui-card__media{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}.ui-card__meta{color:var(--ui-text-muted);font-size:var(--ui-fs-caption);line-height:16px}.ui-card--media[data-ratio="4/3"]>.ui-card__media{aspect-ratio:4 / 3}.ui-card--media[data-ratio="1/1"]>.ui-card__media{aspect-ratio:1 / 1}.ui-card__media{display:block;width:100%;aspect-ratio:16 / 10;margin:0;padding:0;border:0;border-bottom:1px solid var(--ui-border);background:var(--ui-surface-2);overflow:hidden;color:inherit}.ui-card__media>img{display:block;width:100%;height:100%;object-fit:cover}button.ui-card__media,a.ui-card__media{cursor:pointer}.ui-card__media:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:-2px}.ui-card__body{display:grid;justify-items:start;gap:var(--ui-space-2, 8px);padding:var(--ui-space-3, 12px) var(--ui-space-4, 16px);min-width:0}.ui-card__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ui-space-2, 8px);margin-top:auto;padding:0 var(--ui-space-4, 16px) var(--ui-space-3, 12px);color:var(--ui-text-muted);font-size:var(--ui-fs-caption, 13px)}.ui-overlay>.ui-modal{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}.ui-modal>.ui-modal__head,.ui-modal>.ui-modal__foot{flex:none}.ui-modal>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}.ui-delta{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:2px;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-text-muted);font-variant-numeric:tabular-nums}.ui-delta--good{color:var(--ui-success-fg)}.ui-delta--bad{color:var(--ui-danger-fg)}.ui-metrics--grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:var(--ui-space-3);margin:0}.ui-metric--lg{gap:4px;padding:var(--ui-space-3) var(--ui-space-4)}.ui-metric--lg .ui-metric__val{font-size:24px;line-height:32px}.ui-metric--lg .ui-metric__lbl{order:-1;font-size:var(--ui-fs-body)}.ui-metric__foot{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}@media (max-width: 520px){.ui-metrics--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.ui-funnel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--ui-space-2);margin:0;padding:0;list-style:none}.ui-funnel>li{position:relative;display:flex;flex-direction:column;gap:2px;padding:var(--ui-space-3);border-radius:var(--ui-radius-md);background:var(--ui-surface-2);min-width:0}.ui-funnel__val{font-size:20px;font-weight:700;color:var(--ui-text);font-variant-numeric:tabular-nums;line-height:24px}.ui-funnel__lbl{font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted);overflow-wrap:anywhere}.ui-funnel__rate{order:-1;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-series-1);font-variant-numeric:tabular-nums}@media (max-width: 520px){.ui-funnel{grid-auto-flow:row}}.ui-grid{display:grid;gap:var(--ui-space-4);align-items:start}.ui-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width: 1100px){.ui-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 960px){.ui-grid--2{grid-template-columns:minmax(0,1fr)}}@media (max-width: 720px){.ui-grid--3{grid-template-columns:minmax(0,1fr)}}.ui-section-head{margin:var(--ui-space-4) 0 0}.ui-section-head>h2{margin:0;font-size:14px;line-height:20px;font-weight:650;color:var(--ui-text)}.ui-section-head>p{margin:2px 0 0;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}.ui-seg{max-width:100%;overflow-x:auto}.ui-seg :is(button,a).is-text{flex:none;white-space:nowrap}@media (max-width: 360px){.ui-seg :is(button,a).is-text{padding:0 9px}}.ui-btn--critical:focus-visible{outline-color:var(--gemboss-danger-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn,.ui-btn.ui-btn--sm,.ui-select.ui-select{min-height:44px}.ui-btn--icon.ui-btn--sm{min-width:44px}.ui-seg :is(button,a){height:44px}}.ui-badge--success{background:var(--gemboss-success-soft);color:var(--gemboss-success-strong)}.ui-badge--warning{background:var(--gemboss-warning-soft);color:var(--gemboss-warning)}.ui-badge--critical{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.ui-badge--info{background:var(--gemboss-accent-soft);color:var(--gemboss-accent-strong)}.ui-badge--dot:before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:currentColor}.ui-banner{--ui-banner-bg: var(--ui-surface-2);--ui-banner-fg: var(--ui-text);border-radius:var(--ui-radius-lg);overflow:hidden;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 0 0 1px var(--ui-border),0 3px 1px -1px #1a1a1a12;font-size:var(--ui-fs-body);line-height:20px}.ui-banner--success{--ui-banner-bg: var(--gemboss-success-soft);--ui-banner-fg: var(--gemboss-success-strong)}.ui-banner--warning{--ui-banner-bg: var(--gemboss-warning-soft);--ui-banner-fg: var(--gemboss-warning)}.ui-banner--critical{--ui-banner-bg: var(--gemboss-danger-soft);--ui-banner-fg: var(--gemboss-danger-strong)}.ui-banner--info{--ui-banner-bg: var(--gemboss-accent-soft);--ui-banner-fg: var(--gemboss-accent-strong)}.ui-banner__head{display:flex;align-items:center;gap:var(--ui-space-2);min-height:32px;padding:6px var(--ui-space-3);background:var(--ui-banner-bg);color:var(--ui-banner-fg)}.ui-banner__icon{flex:none;width:20px;height:20px;fill:currentColor}.ui-banner__title{flex:1 1 auto;min-width:0;margin:0;font-size:var(--ui-fs-body);font-weight:650;line-height:20px}.ui-banner__close{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px -8px -6px 0;border:0;border-radius:var(--ui-radius-md);background:transparent;color:inherit;cursor:pointer}.ui-banner__close:hover{background:color-mix(in srgb,currentColor 10%,transparent)}.ui-banner__close:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-banner__close svg{width:16px;height:16px}.ui-banner__body{padding:var(--ui-space-3) var(--ui-space-4)}.ui-banner__body>:first-child{margin-top:0}.ui-banner__body>:last-child{margin-bottom:0}.ui-banner__actions{display:flex;flex-wrap:wrap;gap:var(--ui-space-2);margin-top:var(--ui-space-3)}@media (pointer: coarse),(max-width: 47.9975em){.ui-banner__close{width:44px;height:44px;margin:-12px -12px -12px 0}}.ui-help{margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--ui-text-muted)}.ui-error:empty{display:none}.ui-error{display:flex;gap:6px;margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--gemboss-danger-strong)}.ui-error:before{content:"";flex:none;width:16px;height:16px;margin-top:2px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat}.gemboss-field[aria-invalid=true],.gemboss-field--group:has([aria-invalid=true]),.ui-select[aria-invalid=true],.ui-textarea[aria-invalid=true]{border-color:var(--gemboss-danger-strong);background-color:var(--gemboss-danger-soft)}.ui-choices{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0;padding:0;border:0;min-width:0}.ui-choices>legend{padding:0}.ui-switch>input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;width:32px;height:20px;margin:0;border-radius:var(--gemboss-radius-full);background:var(--gemboss-field-line);transition:background-color var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--gemboss-surface);box-shadow:0 1px 2px #0003;transition:transform var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:checked{background:var(--ui-accent)}.ui-switch>input[type=checkbox]:checked:before{transform:translate(12px)}@media (prefers-reduced-motion: reduce){.ui-switch>input[type=checkbox],.ui-switch>input[type=checkbox]:before{transition:none}}.ui-tooltip{position:relative;display:inline-flex}.ui-tooltip__bubble{position:absolute;z-index:30;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);width:max-content;max-width:240px;padding:4px 8px;border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:450;box-shadow:0 8px 16px -4px #1a1a1a38,0 0 0 1px var(--ui-border);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--gemboss-transition-fast) ease}.ui-tooltip--end .ui-tooltip__bubble{left:auto;right:0;transform:none}.ui-tooltip:hover>.ui-tooltip__bubble,.ui-tooltip:focus-within>.ui-tooltip__bubble{opacity:1;visibility:visible}.ui-spinner{display:inline-block;flex:none;width:20px;height:20px;box-sizing:border-box;border-radius:50%;border:2px solid color-mix(in srgb,var(--ui-text) 18%,transparent);border-top-color:var(--ui-text);animation:ui-spin .7s linear infinite;vertical-align:middle}.ui-spinner--lg{width:44px;height:44px;border-width:4px}@keyframes ui-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.ui-spinner{animation-duration:2s}}.ui-progress{appearance:none;-webkit-appearance:none;display:block;width:100%;height:8px;border:0;border-radius:var(--gemboss-radius-full);overflow:hidden;background:var(--gemboss-divider);color:var(--ui-accent)}.ui-progress::-webkit-progress-bar{background:var(--gemboss-divider);border-radius:inherit}.ui-progress::-webkit-progress-value{background:currentColor;border-radius:inherit}.ui-progress::-moz-progress-bar{background:currentColor;border-radius:inherit}.ui-progress--success{color:var(--gemboss-success)}.ui-progress--critical{color:var(--gemboss-danger)}dialog.ui-modal{padding:0;max-width:calc(100% - 40px);max-height:calc(100dvh - 40px);color:var(--ui-text)}dialog.ui-modal[open]{display:flex;flex-direction:column}dialog.ui-modal::backdrop{background:#00000080}html:has(dialog.ui-modal:modal){overflow:hidden}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn.ui-btn--sm{min-width:44px}}.ui-badge--wrap{white-space:normal;overflow-wrap:anywhere;line-height:16px}.ui-page-head--actions{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 16px}.ui-page-head--actions>:first-child{min-width:0}.ui-page-head__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-2)}.ui-chips>button.ui-tag--chip{min-height:28px;padding:4px 12px;border-radius:var(--ui-radius-md, 8px);cursor:pointer;font-family:inherit;font-size:var(--gemboss-fs-caption, 12px);color:var(--ui-text)}.ui-chips>button.ui-tag--chip:hover{background:var(--ui-surface-2);border-color:var(--ui-text-muted)}.ui-chips>button.ui-tag--chip:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.ui-chips>button.ui-tag--chip[aria-pressed=true]{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-accent-strong);font-weight:600}@media (pointer: coarse),(max-width: 47.9975em){.ui-chips>button.ui-tag--chip{min-height:44px;min-width:44px;justify-content:center}}@media (max-width: 47.9975em){.gemboss-ec-input.gemboss-ec-input textarea{font-size:16px}}:is(.gemboss-field,.ui-textarea)[readonly][readonly]{background:var(--ui-surface-2);border-color:var(--ui-border);cursor:default}.ui-modal>form{display:contents}.ui-modal>form>.ui-modal__head,.ui-modal>form>.ui-modal__foot{flex:none}.ui-modal>form>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}button.ui-metric{font:inherit;text-align:left;color:inherit;cursor:pointer}button.ui-metric:hover{border-color:var(--ui-text-muted)}button.ui-metric:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-metric.ui-metric:is([aria-pressed=true],[aria-current=page]){border-color:var(--gemboss-accent);box-shadow:inset 0 0 0 1px var(--gemboss-accent)}.ui-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;padding:16px 0;color:var(--ui-text-muted);font-size:var(--ui-fs-body);text-align:center}.ui-more[hidden]{display:none}.ui-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:var(--ui-btn-h, 28px);padding:0 12px;border:1px dashed var(--ui-border);border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font:inherit;font-size:var(--ui-fs-caption);font-weight:550;line-height:16px;white-space:nowrap;text-decoration:none;cursor:pointer}.ui-chip:hover{border-style:solid;background:var(--ui-surface-2)}.ui-chip:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-chip:is([aria-pressed=true],[aria-current=page],[aria-current=true]){border-style:solid;border-color:var(--ui-accent);background:var(--ui-accent-soft);color:var(--ui-accent-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-chip{height:auto;min-height:44px;min-width:44px}}.ui-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--ui-space-4)}.ui-stack--tight{gap:var(--ui-space-2)}
package/src/list-page.css CHANGED
@@ -1 +1 @@
1
- .ui-list-page{box-sizing:border-box;max-width:var(--ui-content-max, 900px);margin-inline:auto;padding-inline:24px;display:flex;flex-direction:column;gap:16px;padding-bottom:24px;container:ui-list-page / inline-size;--ui-list-page-text: var(--p-color-text, var(--ui-text-strong));--ui-list-page-muted: var(--p-color-text-secondary, var(--ui-text-muted));--ui-list-page-fill: var(--p-color-bg-fill-tertiary, var(--gemboss-fill-tertiary, #e3e3e3));--ui-list-page-fill-hover: var(--p-color-bg-fill-tertiary-hover, var(--gemboss-fill-tertiary-hover, #d4d4d4));--ui-list-page-fill-active: var(--p-color-bg-fill-tertiary-active, var(--gemboss-fill-tertiary-active, #cccccc))}@media (max-width: 30.6225em){.ui-list-page{padding-inline:0}}.ui-list-page__head{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions" "sub .";align-items:start;column-gap:16px;padding-top:24px;margin-bottom:8px}.ui-list-page__head--back{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back title actions" ". sub ."}.ui-list-page__head--back>:is(.ui-list-page__title-row,.ui-list-page__subtitle){margin-left:-12px}.ui-list-page__back{grid-area:back;color:var(--ui-list-page-text);border-color:transparent}.ui-list-page__back:hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__back svg{width:20px;height:20px}.ui-list-page__title-row{grid-area:title;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;min-height:28px}.ui-list-page__title{margin:0;color:var(--ui-list-page-text);font-size:20px;line-height:24px;font-weight:700;letter-spacing:-.01em;overflow-wrap:anywhere}.ui-list-page__subtitle{grid-area:sub;min-width:0;margin:2px 0 0;color:var(--ui-list-page-muted);font-size:12px;line-height:16px;overflow-wrap:anywhere}.ui-list-page__actions{grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}.ui-list-page__action{background:var(--ui-list-page-fill);border-color:transparent;color:var(--ui-list-page-text)}.ui-list-page__action:not([aria-disabled=true]):hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__action:not([aria-disabled=true]):active{background:var(--ui-list-page-fill-active)}.ui-list-page__action--danger{color:var(--gemboss-danger-strong, #8e0b21)}.ui-list-page__more>summary{background:var(--ui-list-page-fill);border-color:transparent;color:var(--ui-list-page-text)}.ui-list-page__more>summary:hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__narrow{display:none}.ui-list-page__notices:empty,.ui-list-page__toolbar:empty,.ui-list-page__notices:has(>:only-child:empty),.ui-list-page__toolbar:has(>:only-child:empty){display:none}@container ui-list-page (max-width: 559.98px){.ui-list-page__wide{display:none}.ui-list-page__narrow{display:inline-flex}}@media (max-width: 47.9975em){.ui-list-page__head{padding-top:16px;margin-bottom:0;grid-template-areas:"title actions" "sub sub"}.ui-list-page__head--back{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back . actions" "title title title" "sub sub sub"}.ui-list-page__head--back>:is(.ui-list-page__title-row,.ui-list-page__subtitle){margin-left:0}.ui-list-page__head--back>.ui-list-page__title-row{margin-top:12px}.ui-list-page__head:not(.ui-list-page__head--back):has(>.ui-list-page__actions)>.ui-list-page__title-row{min-height:44px}.ui-list-page__wide{display:none}.ui-list-page__narrow{display:inline-flex}}.ui-list-page__card{padding:0;overflow:hidden}@media (max-width: 30.6225em){.ui-list-page__card{border-radius:0}}.ui-list-page__card-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:16px;border-bottom:1px solid var(--ui-border)}.ui-list-page__card-title{margin:0;color:var(--ui-list-page-text);font-size:14px;line-height:20px;font-weight:650}.ui-list-page__skeleton{display:grid;gap:8px;padding:16px}.ui-list-page__skeleton+.ui-list-page__skeleton{border-top:1px solid var(--ui-border)}.ui-list-page__skeleton .ui-skeleton__line:last-child{width:60%}.ui-list-page__error{padding:16px}.ui-list-page__error .ui-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}.ui-list-page__no-match{padding:32px 16px}.ui-list-page__section-title{margin-bottom:-8px}
1
+ .ui-list-page{box-sizing:border-box;max-width:var(--ui-content-max, 900px);margin-inline:auto;padding-inline:24px;display:flex;flex-direction:column;gap:16px;padding-bottom:24px;container:ui-list-page ui-page-column / inline-size;--ui-list-page-muted: var(--p-color-text-secondary, var(--ui-text-muted))}.ui-list-page{--ui-list-page-text: var(--p-color-text, var(--ui-text-strong));--ui-list-page-fill: var(--p-color-bg-fill-tertiary, var(--gemboss-fill-tertiary, #e3e3e3));--ui-list-page-fill-hover: var(--p-color-bg-fill-tertiary-hover, var(--gemboss-fill-tertiary-hover, #d4d4d4));--ui-list-page-fill-active: var(--p-color-bg-fill-tertiary-active, var(--gemboss-fill-tertiary-active, #cccccc))}.ui-list-page__actions:not(.ui-list-page *){--ui-list-page-text: var(--p-color-text, var(--ui-text-strong));--ui-list-page-fill: var(--p-color-bg-fill-tertiary, var(--gemboss-fill-tertiary, #e3e3e3));--ui-list-page-fill-hover: var(--p-color-bg-fill-tertiary-hover, var(--gemboss-fill-tertiary-hover, #d4d4d4));--ui-list-page-fill-active: var(--p-color-bg-fill-tertiary-active, var(--gemboss-fill-tertiary-active, #cccccc))}@media (max-width: 30.6225em){.ui-list-page{padding-inline:0}}.ui-list-page__head{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions" "sub .";align-items:start;column-gap:16px;padding-top:24px;margin-bottom:8px}.ui-list-page__head--back{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back title actions" ". sub ."}.ui-list-page__head--back>:is(.ui-list-page__title-row,.ui-list-page__subtitle){margin-left:-12px}.ui-list-page__back{grid-area:back;color:var(--ui-list-page-text);border-color:transparent}.ui-list-page__back:hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__back svg{width:20px;height:20px}.ui-list-page__title-row{grid-area:title;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;min-height:28px}.ui-list-page__title{margin:0;color:var(--ui-list-page-text);font-size:20px;line-height:24px;font-weight:700;letter-spacing:-.01em;overflow-wrap:anywhere}.ui-list-page__subtitle{grid-area:sub;min-width:0;margin:2px 0 0;color:var(--ui-list-page-muted);font-size:12px;line-height:16px;overflow-wrap:anywhere}.ui-list-page__actions{grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}.ui-list-page__action{background:var(--ui-list-page-fill);border-color:transparent;color:var(--ui-list-page-text)}.ui-list-page__action:not([aria-disabled=true]):hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__action:not([aria-disabled=true]):active{background:var(--ui-list-page-fill-active)}.ui-list-page__action--danger{color:var(--gemboss-danger-strong, #8e0b21)}.ui-list-page__more>summary{background:var(--ui-list-page-fill);border-color:transparent;color:var(--ui-list-page-text)}.ui-list-page__more>summary:hover{background:var(--ui-list-page-fill-hover)}.ui-list-page__narrow{display:none}.ui-list-page__notices:empty,.ui-list-page__toolbar:empty,.ui-list-page__notices:has(>:only-child:empty),.ui-list-page__toolbar:has(>:only-child:empty){display:none}@container ui-page-column (max-width: 559.98px){.ui-list-page__wide{display:none}.ui-list-page__narrow{display:inline-flex}}@media (max-width: 47.9975em){.ui-list-page__head{padding-top:16px;margin-bottom:0;grid-template-areas:"title actions" "sub sub"}.ui-list-page__head--back{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"back . actions" "title title title" "sub sub sub"}.ui-list-page__head--back>:is(.ui-list-page__title-row,.ui-list-page__subtitle){margin-left:0}.ui-list-page__head--back>.ui-list-page__title-row{margin-top:12px}.ui-list-page__head:not(.ui-list-page__head--back):has(>.ui-list-page__actions)>.ui-list-page__title-row{min-height:44px}.ui-list-page__wide{display:none}.ui-list-page__narrow{display:inline-flex}}.ui-list-page__card{padding:0;overflow:hidden}@media (max-width: 30.6225em){.ui-list-page__card{border-radius:0}}.ui-list-page__card-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:16px;border-bottom:1px solid var(--ui-border)}.ui-list-page__card-title{margin:0;color:var(--ui-list-page-text);font-size:14px;line-height:20px;font-weight:650}.ui-list-page__skeleton{display:grid;gap:8px;padding:16px}.ui-list-page__skeleton+.ui-list-page__skeleton{border-top:1px solid var(--ui-border)}.ui-list-page__skeleton .ui-skeleton__line:last-child{width:60%}.ui-list-page__error{padding:16px}.ui-list-page__error .ui-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}.ui-list-page__no-match{padding:32px 16px}.ui-list-page__section-title{margin-bottom:-8px}
package/src/list-page.tsx CHANGED
@@ -27,11 +27,52 @@
27
27
  * `ui-empty--no-match` lives in collections.css (the parts gate holds a component to the CSS it imports).
28
28
  */
29
29
  import "./list-page.css";
30
- import React, { useId } from "react";
30
+ import React, { useEffect, useId, useLayoutEffect, useRef, useSyncExternalStore } from "react";
31
31
  import { PageTabs } from "./page-tabs";
32
32
  import { Icon } from "./icons";
33
33
  import { Menu, MenuGroup, MenuItem, MenuSeparator } from "./menu";
34
34
 
35
+ // WHERE THE CARD STOOD (02/11/2026). A page's notices, toolbar and the line under its title often come with its read, so they
36
+ // appear above the loading card and push it down: the admin's layout shifts measured in RUM (gemboss_admin_vitals.cls_on), the
37
+ // card of GemSeel's Orders moved 271px on 19 of 96 visits with a CLS of 0.1 or more. With `holdKey` the card's place once read is
38
+ // kept on this device (per key and page width), and while the list loads again the card waits there, the room above it held;
39
+ // what comes with the read fills that room instead of moving the card. A first visit, or one where nothing can be kept, is as
40
+ // before. The place is taken once, as the read lands (what the next read will draw), not later: a banner that comes and goes
41
+ // after (a change made, a failed re-read) would hold room the next visit does not fill (review of #6432).
42
+ const useBeforePaint = typeof window === "undefined" ? useEffect : useLayoutEffect;
43
+ const HOLDS = "gb.list-hold";
44
+ /** At most this many places are kept, the oldest dropped first. */
45
+ const HOLDS_KEPT = 200;
46
+ // The page's own width (the admin's rail takes some) and which side of 768px it is on: the header's spacing changes there.
47
+ const holdSlot = (key: string, page: Element) => {
48
+ const w = page.getBoundingClientRect().width;
49
+ return `${key}@${window.matchMedia("(min-width: 48em)").matches ? "w" : "n"}${Math.round(w / 40)}`;
50
+ };
51
+ function readHolds(): Record<string, number> {
52
+ try {
53
+ const v = JSON.parse(localStorage.getItem(HOLDS) ?? "{}");
54
+ return v && typeof v === "object" && !Array.isArray(v) ? v : {};
55
+ } catch {
56
+ return {};
57
+ }
58
+ }
59
+ function readHold(slot: string): number {
60
+ const v = Number(readHolds()[slot]);
61
+ return Number.isFinite(v) && v > 0 ? v : 0;
62
+ }
63
+ function writeHold(slot: string, top: number): void {
64
+ try {
65
+ const holds = readHolds();
66
+ if (holds[slot] === top) return;
67
+ delete holds[slot];
68
+ holds[slot] = top;
69
+ const slots = Object.keys(holds);
70
+ for (const old of slots.slice(0, Math.max(0, slots.length - HOLDS_KEPT))) delete holds[old];
71
+ localStorage.setItem(HOLDS, JSON.stringify(holds));
72
+ } catch { /* a private window keeps nothing: no hold */ }
73
+ }
74
+ const noSubscription = () => () => {};
75
+
35
76
  export interface ListPageAction {
36
77
  content: string;
37
78
  onAction?: () => void;
@@ -42,6 +83,8 @@ export interface ListPageAction {
42
83
  destructive?: boolean;
43
84
  /** Why it is disabled, or what it will do: the button's title, the menu row's hint. */
44
85
  helpText?: string;
86
+ /** Working: off, and these words in place of its own ("Reading your site…"), on the button and on its ⋯ row (08/11/2026). */
87
+ busy?: string | null;
45
88
  }
46
89
 
47
90
  /** A choice in an action group: the one that is on is `active` (a check before it; the others none). */
@@ -52,12 +95,102 @@ export interface ListPageChoice extends ListPageAction {
52
95
  export type ListPageState = "ready" | "loading" | "empty" | "no-match" | "error";
53
96
 
54
97
 
55
- /** How many secondary actions stand as buttons from 768px up; the rest are behind ⋯. */
98
+ /** How many secondary actions stand as buttons in a page column of 560px or more (and 768px up); the rest are behind ⋯. */
56
99
  const WIDE_SECONDARY = 2;
100
+ /** Off: disabled, or busy with words (an empty `busy` is not busy: the action keeps its words and stays on). One rule for the
101
+ * button and its ⋯ row. */
102
+ const isOff = (a: ListPageAction): boolean => !!a.disabled || !!a.busy;
103
+
104
+ /**
105
+ * A PAGE'S HEADER ACTIONS, AS LISTPAGE DRAWS THEM, FOR ANY PAGE (08/11/2026): the admin's Store hub drew its own copy (folding,
106
+ * busy words, the off button's reason) because it is not a list page; Chris 08/11: one control set, the same component on every
107
+ * surface. The first two secondary actions stand as buttons and the rest are behind ⋯ in a page column of 560px or more; in a
108
+ * narrower column and below 768px all of them are behind one ⋯; the primary action always stands, last.
109
+ *
110
+ * The column is the nearest `ui-page-column` query container: ListPage's own page is one; any other page names its column so
111
+ * (`container: ui-page-column / inline-size`, the admin's Store on its Polaris Page). Without one, only the viewport folds them.
112
+ */
113
+ export function PageActions({ primaryAction, primary, secondaryActions = [], moreActions = [], actionGroups = [], linkAs = "a" }: {
114
+ /** The ONE thing to do here, as the page's own button (a node: the admin's Polaris Button, a Publish that counts changes). */
115
+ primaryAction?: React.ReactNode;
116
+ /** Or that one thing as an action, drawn as the secondary ones are (off with its reason, busy, a link), dark: what a page with
117
+ * no button of its own passes (the admin's Store: Journal's Share report). With `primaryAction`, this one is not drawn. */
118
+ primary?: ListPageAction;
119
+ secondaryActions?: ListPageAction[];
120
+ /** Always behind ⋯, at every width, after the secondary actions there (the admin's Store: Ask Gem, which its drawings keep
121
+ * under ⋯ beside a tab's own buttons). */
122
+ moreActions?: ListPageAction[];
123
+ /** Choices of one kind, always behind ⋯ (Polaris Page's actionGroups). */
124
+ actionGroups?: { title: string; actions: ListPageChoice[] }[];
125
+ /** The app's link (Next's Link). */
126
+ linkAs?: React.ElementType;
127
+ }) {
128
+ const Link = linkAs;
129
+ const uid = useId();
130
+ const wide = secondaryActions.slice(0, WIDE_SECONDARY);
131
+ const overflow = [...secondaryActions.slice(WIDE_SECONDARY), ...moreActions];
132
+ const all = [...secondaryActions, ...moreActions];
133
+ // Each group is a titled set of choices, every one of them a menuitemradio (its `active` true or false), after a line when
134
+ // rows come before it.
135
+ const groups = (after: boolean) => actionGroups.map((g, gi) => (
136
+ <React.Fragment key={`${gi}:${g.title}`}>
137
+ {after || gi > 0 ? <MenuSeparator /> : null}
138
+ <MenuGroup title={g.title}>{g.actions.map((a, i) => item(a, i, !!a.active))}</MenuGroup>
139
+ </React.Fragment>
140
+ ));
141
+ // A ⋯ that holds only one group of choices is named by it ("Auto-refresh options"), as the caret beside Refresh now was;
142
+ // any other is "More actions" (review of 3f).
143
+ const wideMore = overflow.length === 0 && actionGroups.length === 1 ? `${actionGroups[0].title} options` : "More actions";
144
+ // `checked` only for a group's choices: an action is never a radio row in the ⋯ and a plain button beside it.
145
+ const item = (a: ListPageAction, i: number, checked?: boolean) => (
146
+ <MenuItem key={`${i}:${a.content}`} checked={checked} href={a.url} linkAs={a.url && !a.external ? Link : undefined} danger={a.destructive} disabled={isOff(a)} hint={a.helpText}
147
+ onClick={a.onAction && !isOff(a) ? () => a.onAction!() : undefined}
148
+ {...(a.url && a.external ? { target: "_blank", rel: "noopener noreferrer" } : {})}>{a.busy || a.content}</MenuItem>
149
+ );
150
+ // A button says the same as its ⋯ row: a disabled one stays focusable (aria-disabled) with its reason as its description,
151
+ // which a keyboard and a screen reader reach; a `title` alone, on a `disabled` button, reaches neither.
152
+ const button = (a: ListPageAction, i: number | "primary") => {
153
+ const cls = i === "primary" ? "ui-btn ui-btn--primary"
154
+ : `ui-btn ui-list-page__action${a.destructive ? " ui-list-page__action--danger" : ""} ui-list-page__wide`;
155
+ const why = a.helpText ? `${uid}-why-${i}` : undefined;
156
+ const run = a.onAction ? () => a.onAction!() : undefined;
157
+ // An external action (a new tab, a download) is a plain link: through the app's Link, Next would prefetch it, and a
158
+ // download route would build its file on every visit (review of 3e, Tests' Export CSV).
159
+ const To: React.ElementType = a.external ? "a" : Link;
160
+ const off = isOff(a);
161
+ return (
162
+ <React.Fragment key={`${i}:${a.content}`}>
163
+ {a.url && !off ? (
164
+ <To href={a.url} className={cls} title={a.helpText} aria-describedby={why} onClick={run}
165
+ {...(a.external ? { target: "_blank", rel: "noopener noreferrer" } : {})}>{a.content}</To>
166
+ ) : (
167
+ <button type="button" className={cls} aria-disabled={off || undefined} aria-busy={a.busy ? true : undefined} title={a.helpText}
168
+ aria-describedby={why} onClick={off ? undefined : run}>{a.busy || a.content}</button>
169
+ )}
170
+ {why ? <span id={why} hidden>{a.helpText}</span> : null}
171
+ </React.Fragment>
172
+ );
173
+ };
174
+ // Nothing of the page's own to fold (no secondary action): the wide ⋯ and the narrow one would hold the same rows, so there is
175
+ // one, the same at every width (review of #6961: two menus hydrated, one hidden).
176
+ const one = secondaryActions.length === 0;
177
+ return (
178
+ <div className="ui-list-page__actions">
179
+ {wide.map((a, i) => button(a, i))}
180
+ {one
181
+ ? (overflow.length || actionGroups.length ? <Menu label={wideMore} end className="ui-list-page__more">{overflow.map((a, i) => item(a, i))}{groups(overflow.length > 0)}</Menu> : null)
182
+ : <>
183
+ {overflow.length || actionGroups.length ? <span className="ui-list-page__wide"><Menu label={wideMore} end className="ui-list-page__more">{overflow.map((a, i) => item(a, i))}{groups(overflow.length > 0)}</Menu></span> : null}
184
+ <span className="ui-list-page__narrow"><Menu label="More actions" end className="ui-list-page__more">{all.map((a, i) => item(a, i))}{groups(all.length > 0)}</Menu></span>
185
+ </>}
186
+ {primaryAction ?? (primary ? button(primary, "primary") : null)}
187
+ </div>
188
+ );
189
+ }
57
190
 
58
191
  export function ListPage({
59
192
  title, subtitle, back, titleMeta, primaryAction, secondaryActions = [], actionGroups = [], notices, toolbar,
60
- state = "ready", empty, noMatch, error, loadingRows = 3, loadingText = "Loading…", cardTitle, cardMeta, cardLead, card = true, cardProps, after, children, linkAs = "a",
193
+ state = "ready", empty, noMatch, error, loadingRows = 3, loadingText = "Loading…", cardTitle, cardMeta, cardLead, card = true, cardProps, after, children, linkAs = "a", holdKey,
61
194
  }: {
62
195
  title: React.ReactNode;
63
196
  /** One line under the title: what the page holds, with its count first when it has one ("12 rules · 9 on."). */
@@ -111,51 +244,18 @@ export function ListPage({
111
244
  children?: React.ReactNode;
112
245
  /** The app's link (Next's Link), as IndexTable takes it. */
113
246
  linkAs?: React.ElementType;
247
+ /** Keep the card's place once read under this key (the page and its shop, `gemseel:orders:<shop>`), and while the list loads
248
+ * again hold the room above the card, so what comes with the read does not push it down (WHERE THE CARD STOOD, above). */
249
+ holdKey?: string;
114
250
  }) {
115
251
  const Link = linkAs;
116
- const uid = useId();
117
- const wide = secondaryActions.slice(0, WIDE_SECONDARY);
118
- const overflow = secondaryActions.slice(WIDE_SECONDARY);
252
+ const pageRef = useRef<HTMLDivElement>(null);
253
+ const cardRef = useRef<HTMLElement>(null);
254
+ // A page the server drew was painted before this code ran: holding its card now would move it, the shift this is for. True only
255
+ // on the render that hydrates it (and on the server); its first loading is left as drawn, later ones are held.
256
+ const hydrating = useSyncExternalStore(noSubscription, () => false, () => true);
257
+ const paintedByServer = useRef(hydrating);
119
258
  const hasActions = Boolean(primaryAction) || secondaryActions.length > 0 || actionGroups.length > 0;
120
- // Each group is a titled set of choices, every one of them a menuitemradio (its `active` true or false), after a line when
121
- // rows come before it.
122
- const groups = (after: boolean) => actionGroups.map((g, gi) => (
123
- <React.Fragment key={`${gi}:${g.title}`}>
124
- {after || gi > 0 ? <MenuSeparator /> : null}
125
- <MenuGroup title={g.title}>{g.actions.map((a, i) => item(a, i, !!a.active))}</MenuGroup>
126
- </React.Fragment>
127
- ));
128
- // A ⋯ that holds only one group of choices is named by it ("Auto-refresh options"), as the caret beside Refresh now was;
129
- // any other is "More actions" (review of 3f).
130
- const wideMore = overflow.length === 0 && actionGroups.length === 1 ? `${actionGroups[0].title} options` : "More actions";
131
- // `checked` only for a group's choices: an action is never a radio row in the ⋯ and a plain button beside it.
132
- const item = (a: ListPageAction, i: number, checked?: boolean) => (
133
- <MenuItem key={`${i}:${a.content}`} checked={checked} href={a.url} linkAs={a.url && !a.external ? Link : undefined} danger={a.destructive} disabled={a.disabled} hint={a.helpText}
134
- onClick={a.onAction ? () => a.onAction!() : undefined}
135
- {...(a.url && a.external ? { target: "_blank", rel: "noopener noreferrer" } : {})}>{a.content}</MenuItem>
136
- );
137
- // A button says the same as its ⋯ row: a disabled one stays focusable (aria-disabled) with its reason as its description,
138
- // which a keyboard and a screen reader reach; a `title` alone, on a `disabled` button, reaches neither.
139
- const button = (a: ListPageAction, i: number) => {
140
- const cls = `ui-btn ui-list-page__action${a.destructive ? " ui-list-page__action--danger" : ""} ui-list-page__wide`;
141
- const why = a.helpText ? `${uid}-why-${i}` : undefined;
142
- const run = a.onAction ? () => a.onAction!() : undefined;
143
- // An external action (a new tab, a download) is a plain link: through the app's Link, Next would prefetch it, and a
144
- // download route would build its file on every visit (review of 3e, Tests' Export CSV).
145
- const To: React.ElementType = a.external ? "a" : Link;
146
- return (
147
- <React.Fragment key={`${i}:${a.content}`}>
148
- {a.url && !a.disabled ? (
149
- <To href={a.url} className={cls} title={a.helpText} aria-describedby={why} onClick={run}
150
- {...(a.external ? { target: "_blank", rel: "noopener noreferrer" } : {})}>{a.content}</To>
151
- ) : (
152
- <button type="button" className={cls} aria-disabled={a.disabled || undefined} title={a.helpText} aria-describedby={why}
153
- onClick={a.disabled ? undefined : run}>{a.content}</button>
154
- )}
155
- {why ? <span id={why} hidden>{a.helpText}</span> : null}
156
- </React.Fragment>
157
- );
158
- };
159
259
 
160
260
  // The words are said by the page's one status region (below), not by the busy rows: a screen reader may hold back a live
161
261
  // region inside an aria-busy one.
@@ -194,8 +294,41 @@ export function ListPage({
194
294
  // A lead is card content, and a card that came and went would remount it (review of 3d).
195
295
  const boxed = card || (cardLead != null && cardLead !== false) || (state !== "ready" && !(state === "empty" && empty != null));
196
296
 
297
+ // Loading: the card waits where it stood once read. Its margin is set on the element before the first paint, on top of its own,
298
+ // and set again whenever the page changes height while it loads (a band above it that reads on its own), so its top stays the
299
+ // kept one; it is put back before the paint that shows the read.
300
+ useBeforePaint(() => {
301
+ if (state !== "loading") { paintedByServer.current = false; return; }
302
+ const page = pageRef.current;
303
+ const box = cardRef.current;
304
+ if (!holdKey || paintedByServer.current || !page || !box) return;
305
+ const want = readHold(holdSlot(holdKey, page));
306
+ if (!want) return;
307
+ const own = box.style.marginTop;
308
+ const base = parseFloat(getComputedStyle(box).marginTop) || 0;
309
+ let added = 0;
310
+ const place = () => {
311
+ const top = box.getBoundingClientRect().top - page.getBoundingClientRect().top;
312
+ const next = Math.max(0, added + want - top);
313
+ if (Math.abs(next - added) >= 1) { added = next; box.style.marginTop = `${base + added}px`; }
314
+ };
315
+ place();
316
+ const watch = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(place);
317
+ watch?.observe(page);
318
+ return () => { watch?.disconnect(); box.style.marginTop = own; };
319
+ }, [holdKey, state]);
320
+ // Read (a list, an empty one, or none matching; not a failed read): keep where the card stands as the read lands.
321
+ useBeforePaint(() => {
322
+ if (!holdKey || state === "loading" || state === "error" || !boxed) return;
323
+ const page = pageRef.current;
324
+ const box = cardRef.current;
325
+ if (!page || !box) return;
326
+ const top = Math.round(box.getBoundingClientRect().top - page.getBoundingClientRect().top);
327
+ if (top > 0) writeHold(holdSlot(holdKey, page), top);
328
+ }, [holdKey, state, boxed]);
329
+
197
330
  return (
198
- <div className="ui-list-page">
331
+ <div className="ui-list-page" ref={pageRef}>
199
332
  <header className={`ui-list-page__head${back ? " ui-list-page__head--back" : ""}`}>
200
333
  {back ? (
201
334
  <Link href={back.href} className="ui-btn ui-btn--icon ui-list-page__back" aria-label={`Back to ${back.label}`} title={back.label}>
@@ -208,14 +341,7 @@ export function ListPage({
208
341
  </div>
209
342
  {/* Its own cell: under the title from 768px up, across the whole header below (where the actions share the title's row). */}
210
343
  {subtitle ? <p className="ui-list-page__subtitle">{subtitle}</p> : null}
211
- {hasActions ? (
212
- <div className="ui-list-page__actions">
213
- {wide.map(button)}
214
- {overflow.length || actionGroups.length ? <span className="ui-list-page__wide"><Menu label={wideMore} end className="ui-list-page__more">{overflow.map((a, i) => item(a, i))}{groups(overflow.length > 0)}</Menu></span> : null}
215
- {secondaryActions.length || actionGroups.length ? <span className="ui-list-page__narrow"><Menu label="More actions" end className="ui-list-page__more">{secondaryActions.map((a, i) => item(a, i))}{groups(secondaryActions.length > 0)}</Menu></span> : null}
216
- {primaryAction}
217
- </div>
218
- ) : null}
344
+ {hasActions ? <PageActions primaryAction={primaryAction} secondaryActions={secondaryActions} actionGroups={actionGroups} linkAs={linkAs} /> : null}
219
345
  </header>
220
346
  <PageTabs />
221
347
  {/* ONE status region for the page, there in every state: a live region added with its words already in it is often not
@@ -224,7 +350,7 @@ export function ListPage({
224
350
  {notices ? <div className="ui-list-page__notices">{notices}</div> : null}
225
351
  {toolbar ? <div className="ui-list-page__toolbar">{toolbar}</div> : null}
226
352
  {boxed ? (
227
- <section {...cardProps} className={["ui-card ui-list-page__card", cardProps?.className].filter(Boolean).join(" ")}>
353
+ <section {...cardProps} ref={cardRef} className={["ui-card ui-list-page__card", cardProps?.className].filter(Boolean).join(" ")}>
228
354
  {cardTitle ? <div className="ui-list-page__card-head"><h2 className="ui-list-page__card-title">{cardTitle}</h2>{cardMeta}</div> : null}
229
355
  {cardLead}
230
356
  {body}
@@ -0,0 +1 @@
1
+ .ui-list-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-3, 12px)}.ui-list-toolbar__search{flex:1 1 280px}.ui-list-toolbar__glyph{flex:none;color:var(--ui-text-muted)}.ui-list-toolbar__search input::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ui-list-toolbar__clear{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;margin-right:2px;padding:0;border:0;border-radius:var(--ui-radius-sm, 6px);background:transparent;color:var(--ui-text-muted);cursor:pointer}.ui-list-toolbar__clear:hover{background:var(--ui-surface-2);color:var(--ui-text)}.ui-list-toolbar__clear:focus-visible{outline:none;background:var(--ui-surface-2);color:var(--ui-text)}.ui-list-toolbar__end{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-2, 8px);margin-left:auto}@media (pointer: coarse),(max-width: 47.9975em){.ui-list-toolbar__clear{width:44px;height:44px;margin:-1px 0}}
@@ -0,0 +1,85 @@
1
+ "use client";
2
+ // THE LIST'S TOOLBAR (09/11/2026; Chris 08/11: "các control phải có bộ control … dùng chung shared component", one control set row 8).
3
+ // What sits over a list: a search that grows to fill the row, and at its right the list's choices (filters and sort, as selects), its
4
+ // view switch and what acts on the same list (an Export). One row; on a phone the search keeps its own line and the rest wraps under it.
5
+ // Built from the kit's own parts: the one text field (`gemboss-field`, a group holding the search glyph, the count and a clear button),
6
+ // `.ui-select`, IconSegmented. The GemBoss admin's list screens drew Polaris' TextField and Select here, and the toolkits each laid out a
7
+ // row of their own (`gc-filters`, `cp-toolbar`).
8
+ import "./list-toolbar.css"; // its own stylesheet travels with it: a surface that never draws it never loads it
9
+ import React, { useRef } from "react";
10
+ import { Icon } from "./icons";
11
+ import { IconSegmented } from "./segmented";
12
+
13
+ export interface ListToolbarSelect {
14
+ /** Its name for a screen reader ("Sort by", "Filter by source"). */
15
+ label: string;
16
+ options: ReadonlyArray<{ label: string; value: string }>;
17
+ value: string;
18
+ onChange: (value: string) => void;
19
+ }
20
+
21
+ /** The view switch: IconSegmented's own props, so the two cannot drift apart. */
22
+ export type ListToolbarView<V extends string = string> = Parameters<typeof IconSegmented<V>>[0];
23
+
24
+ export interface ListToolbarProps<V extends string = string> {
25
+ search?: {
26
+ value: string;
27
+ onChange: (value: string) => void;
28
+ /** Its name for a screen reader ("Search plugins"). */
29
+ label: string;
30
+ placeholder?: string;
31
+ /** How many the search found, said inside the field while there is a search. */
32
+ matches?: number;
33
+ /** The clear button's name. Default "Clear search". */
34
+ clearLabel?: string;
35
+ };
36
+ /** The list's choices, in the order drawn: filters, then sort. */
37
+ selects?: ReadonlyArray<ListToolbarSelect>;
38
+ /** The view switch (grid | list). */
39
+ view?: ListToolbarView<V>;
40
+ /** What acts on the same list, last (an Export). */
41
+ tools?: React.ReactNode;
42
+ }
43
+
44
+ export function ListToolbar<V extends string = string>({ search, selects = [], view, tools }: ListToolbarProps<V>) {
45
+ const input = useRef<HTMLInputElement>(null);
46
+ // Only when it holds a control: an empty group still takes the row's gap, so a bar of the search alone would stop short of the
47
+ // column's right edge (the admin's Audiences, 01/11/2026).
48
+ // `cond && <Export />` gives false, "" or 0 when there is nothing to draw: none of them is a tool.
49
+ const hasTools = tools != null && tools !== false && tools !== "" && tools !== 0;
50
+ const end = selects.length > 0 || view != null || hasTools;
51
+ return (
52
+ <div className="ui-list-toolbar">
53
+ {search ? (
54
+ // A <label>: a click anywhere in the box (the glyph, its padding, the count) puts the caret in the field, as Polaris'
55
+ // TextField and the kit's InspectorSearch do.
56
+ <label className="ui-list-toolbar__search gemboss-field gemboss-field--group">
57
+ <Icon name="search" size={16} className="ui-list-toolbar__glyph" />
58
+ <input ref={input} type="search" className="gemboss-field__bare" aria-label={search.label} placeholder={search.placeholder}
59
+ value={search.value} onChange={(e) => search.onChange(e.target.value)} autoComplete="off"
60
+ // Escape empties it in every browser (Firefox's search box does not), as InspectorSearch does.
61
+ onKeyDown={(e) => { if (e.key === "Escape" && search.value) { e.preventDefault(); search.onChange(""); } }} />
62
+ {search.matches != null && search.value.trim() ? <span className="gemboss-field__suffix">{search.matches}</span> : null}
63
+ {search.value ? (
64
+ // The kit's clear, not the browser's (WebKit's ✕ only, and not in Firefox): the search empties and the focus stays in it.
65
+ <button type="button" className="ui-list-toolbar__clear" aria-label={search.clearLabel ?? "Clear search"}
66
+ onClick={() => { search.onChange(""); input.current?.focus(); }}>
67
+ <Icon name="close" size={16} />
68
+ </button>
69
+ ) : null}
70
+ </label>
71
+ ) : null}
72
+ {end ? (
73
+ <div className="ui-list-toolbar__end">
74
+ {selects.map((s) => (
75
+ <select key={s.label} className="ui-select" aria-label={s.label} value={s.value} onChange={(e) => s.onChange(e.target.value)}>
76
+ {s.options.map((o) => <option key={o.value} value={o.value}>{o.label}</option>)}
77
+ </select>
78
+ ))}
79
+ {view ? <IconSegmented {...view} /> : null}
80
+ {hasTools ? tools : null}
81
+ </div>
82
+ ) : null}
83
+ </div>
84
+ );
85
+ }
package/src/menu-keys.ts CHANGED
@@ -90,9 +90,11 @@ export function listenForMenus(): void {
90
90
  if (wired || typeof document === "undefined") return;
91
91
  wired = true;
92
92
  const openMounted = () => Array.from(document.querySelectorAll<HTMLDetailsElement>(`${MENU}[open]`)).filter((d) => mounted.has(d));
93
+ // A click outside closes them, heard in the CAPTURE phase (09/11/2026): a control that stops its own click (the funnel board's
94
+ // offer cards and rule pills) left the menu floating over the panel it opened while this listened in the bubble phase.
93
95
  document.addEventListener("click", (e) => {
94
96
  for (const d of openMounted()) if (!d.contains(e.target as Node)) d.open = false;
95
- });
97
+ }, true);
96
98
  document.addEventListener("keydown", (e) => {
97
99
  // An Escape something else already took (a dialog over the page, a combobox) is not the menus' (review of #5179).
98
100
  if (e.key !== "Escape" || e.isComposing || e.defaultPrevented) return;
@@ -12,6 +12,7 @@
12
12
  import "./portal.css"; // its own stylesheet travels with it (0.23.0): a surface that never renders it never loads it
13
13
  import React, { useCallback, useEffect, useId, useRef, useState } from "react";
14
14
  import { Icon } from "./icons";
15
+ import { holdTab } from "./dialog";
15
16
 
16
17
  const cx = (...p: Array<string | false | null | undefined>) => p.filter(Boolean).join(" ");
17
18
 
@@ -148,7 +149,9 @@ export function SearchDialog({ search, initial = NO_SECTIONS, placeholder = "Sea
148
149
  // frame, and an Enter in that frame opened the previous highlight (measured in the browser test).
149
150
  // `seq` moves on too: an answer still on its way when the popup closed is dropped, not painted into the next opening.
150
151
  onClose={() => { seq.current += 1; setOpen(false); setQ(""); setSections(initialRef.current); setActive(0); setFailed(null); }}
151
- onClick={(e) => { if (e.target === e.currentTarget) e.currentTarget.close(); }}>
152
+ onClick={(e) => { if (e.target === e.currentTarget) e.currentTarget.close(); }}
153
+ // Tab belongs to the open popup, not to a dialog of the page under it (09/11/2026).
154
+ onKeyDown={holdTab}>
152
155
  <div className="gb-search-box">
153
156
  <Icon name="search" size={18} className="gb-search-icon" />
154
157
  <input ref={input} className="gb-search-input" type="search" placeholder={placeholder} aria-label={label}
package/src/segmented.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ReactNode } from "react";
1
+ import type { CSSProperties, ElementType, ReactNode } from "react";
2
2
  import { segmentedClick } from "./segmented-click";
3
3
 
4
4
  /**
@@ -25,6 +25,9 @@ export type SegmentedOption<T extends string> = {
25
25
  /** The accessible name when the label alone is not the full sentence (a count badge, an icon). */
26
26
  ariaLabel?: string;
27
27
  disabled?: boolean;
28
+ /** A filter that is a URL (09/11/2026, Analytics' device): the option is a link, the one on says `aria-current="page"` (ui.css
29
+ * `.ui-seg a[aria-current]`), and a press is the link's own (open in a new tab, copy the link), so `onChange` is not called. */
30
+ href?: string;
28
31
  };
29
32
 
30
33
  /** `scroll`'s layout: the group scrolls inside itself, each tab keeps its words on one line (kit-plain.css's rule, as styles). */
@@ -46,11 +49,12 @@ function wrapLayout(count: number, wrap: number | undefined): { columns: number;
46
49
  }
47
50
 
48
51
  export function Segmented<T extends string>({
49
- options, value, onChange, ariaLabel, disabled, onClear, fill = false, scroll = false, wrap, className, style,
52
+ options, value, onChange, ariaLabel, disabled, onClear, fill = false, scroll = false, wrap, className, style, linkAs,
50
53
  }: {
51
54
  options: SegmentedOption<T>[];
52
55
  value: T | "";
53
- onChange: (v: T) => void;
56
+ /** A press on a button option. Options with an `href` are links and never call it, so a group of links passes none. */
57
+ onChange?: (v: T) => void;
54
58
  ariaLabel: string;
55
59
  /** Greys the whole group while a write is in flight. */
56
60
  disabled?: boolean;
@@ -79,6 +83,8 @@ export function Segmented<T extends string>({
79
83
  className?: string;
80
84
  /** On the group: the inspector narrows a two-option row with a max-width. */
81
85
  style?: CSSProperties;
86
+ /** The app's link (Next's Link) for options with an `href`; a plain <a> without it. */
87
+ linkAs?: ElementType;
82
88
  }) {
83
89
  const rows = scroll ? null : wrapLayout(options.length, wrap);
84
90
  const groupStyle: CSSProperties | undefined = rows
@@ -89,6 +95,16 @@ export function Segmented<T extends string>({
89
95
  {options.map((o, i) => {
90
96
  const active = value === o.value;
91
97
  const last = rows && i === options.length - 1 && rows.lastSpan > 1;
98
+ const cellStyle = scroll ? SCROLL_TAB : rows ? (last ? { ...WRAP_TAB, gridColumn: `span ${rows.lastSpan}` } : WRAP_TAB) : undefined;
99
+ if (o.href !== undefined && !(disabled || o.disabled)) {
100
+ const A = linkAs ?? "a";
101
+ return (
102
+ <A key={o.value} href={o.href} data-value={o.value} title={o.title} aria-label={o.ariaLabel} aria-current={active ? "page" : undefined}
103
+ className={`is-text${active ? " active" : ""}`} style={cellStyle}>
104
+ {o.label}
105
+ </A>
106
+ );
107
+ }
92
108
  return (
93
109
  <button
94
110
  key={o.value}
@@ -100,8 +116,8 @@ export function Segmented<T extends string>({
100
116
  aria-label={o.ariaLabel}
101
117
  aria-pressed={active}
102
118
  className={`is-text${active ? " active" : ""}`}
103
- style={scroll ? SCROLL_TAB : rows ? (last ? { ...WRAP_TAB, gridColumn: `span ${rows.lastSpan}` } : WRAP_TAB) : undefined}
104
- onClick={() => segmentedClick(active, o.value, onChange, onClear)}
119
+ style={cellStyle}
120
+ onClick={() => { if (onChange) segmentedClick(active, o.value, onChange, onClear); }}
105
121
  >
106
122
  {o.label}
107
123
  </button>