@newtone-dev/ui-react-web 0.43.0 → 0.45.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.
- package/dist/app-frame/app-frame.css +36 -92
- package/dist/app-frame/control/control.d.ts +1 -0
- package/dist/app-frame/control/control.d.ts.map +1 -1
- package/dist/app-frame/control/control.js +3 -2
- package/dist/app-frame/control/control.js.map +1 -1
- package/dist/app-frame/launcher/launcher.d.ts +6 -2
- package/dist/app-frame/launcher/launcher.d.ts.map +1 -1
- package/dist/app-frame/launcher/launcher.js +12 -11
- package/dist/app-frame/launcher/launcher.js.map +1 -1
- package/dist/app-frame/main-menu/main-menu.js +7 -3
- package/dist/app-frame/main-menu/main-menu.js.map +1 -1
- package/dist/app-frame/menu/menu.d.ts +1 -0
- package/dist/app-frame/menu/menu.d.ts.map +1 -1
- package/dist/app-frame/menu/menu.js +3 -1
- package/dist/app-frame/menu/menu.js.map +1 -1
- package/dist/app-frame/parts.d.ts +7 -1
- package/dist/app-frame/parts.d.ts.map +1 -1
- package/dist/app-frame/parts.js +14 -5
- package/dist/app-frame/parts.js.map +1 -1
- package/dist/ask-button/ask-button.css +43 -0
- package/dist/ask-button/ask-button.d.ts +24 -0
- package/dist/ask-button/ask-button.d.ts.map +1 -0
- package/dist/ask-button/ask-button.js +19 -0
- package/dist/ask-button/ask-button.js.map +1 -0
- package/dist/ask-button/index.d.ts +3 -0
- package/dist/ask-button/index.d.ts.map +1 -0
- package/dist/ask-button/index.js +2 -0
- package/dist/ask-button/index.js.map +1 -0
- package/dist/badge/badge.css +44 -0
- package/dist/badge/badge.d.ts +16 -0
- package/dist/badge/badge.d.ts.map +1 -0
- package/dist/badge/badge.js +15 -0
- package/dist/badge/badge.js.map +1 -0
- package/dist/badge/index.d.ts +3 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/below/below.css +8 -10
- package/dist/below/below.d.ts +3 -4
- package/dist/below/below.d.ts.map +1 -1
- package/dist/below/below.js +10 -52
- package/dist/below/below.js.map +1 -1
- package/dist/below/grip.d.ts +20 -0
- package/dist/below/grip.d.ts.map +1 -0
- package/dist/below/grip.js +78 -0
- package/dist/below/grip.js.map +1 -0
- package/dist/button/button.css +14 -4
- package/dist/button/button.d.ts +12 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.js +49 -3
- package/dist/button/button.js.map +1 -1
- package/dist/canvas/box/box.d.ts +9 -2
- package/dist/canvas/box/box.d.ts.map +1 -1
- package/dist/canvas/box/box.js +2 -2
- package/dist/canvas/box/box.js.map +1 -1
- package/dist/canvas/canvas.css +114 -28
- package/dist/canvas/canvas.d.ts +9 -2
- package/dist/canvas/canvas.d.ts.map +1 -1
- package/dist/canvas/canvas.js +19 -6
- package/dist/canvas/canvas.js.map +1 -1
- package/dist/canvas/cells/cells.d.ts +15 -4
- package/dist/canvas/cells/cells.d.ts.map +1 -1
- package/dist/canvas/cells/cells.js +25 -10
- package/dist/canvas/cells/cells.js.map +1 -1
- package/dist/canvas/cells/grid.d.ts +40 -2
- package/dist/canvas/cells/grid.d.ts.map +1 -1
- package/dist/canvas/cells/grid.js +101 -6
- package/dist/canvas/cells/grid.js.map +1 -1
- package/dist/canvas/dock/dock.d.ts +6 -1
- package/dist/canvas/dock/dock.d.ts.map +1 -1
- package/dist/canvas/dock/dock.js +19 -3
- package/dist/canvas/dock/dock.js.map +1 -1
- package/dist/canvas/frame/frame.d.ts.map +1 -1
- package/dist/canvas/frame/frame.js +1 -7
- package/dist/canvas/frame/frame.js.map +1 -1
- package/dist/canvas/index.d.ts +2 -1
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js.map +1 -1
- package/dist/canvas/insert/insert.d.ts +18 -0
- package/dist/canvas/insert/insert.d.ts.map +1 -0
- package/dist/canvas/insert/insert.js +40 -0
- package/dist/canvas/insert/insert.js.map +1 -0
- package/dist/canvas/pin/pin.d.ts.map +1 -1
- package/dist/canvas/pin/pin.js +2 -1
- package/dist/canvas/pin/pin.js.map +1 -1
- package/dist/chat/chat.css +2 -7
- package/dist/chat/chat.d.ts +5 -3
- package/dist/chat/chat.d.ts.map +1 -1
- package/dist/chat/chat.js +17 -24
- package/dist/chat/chat.js.map +1 -1
- package/dist/data-grid/data-grid.css +128 -0
- package/dist/data-grid/data-grid.d.ts +45 -0
- package/dist/data-grid/data-grid.d.ts.map +1 -0
- package/dist/data-grid/data-grid.js +50 -0
- package/dist/data-grid/data-grid.js.map +1 -0
- package/dist/data-grid/index.d.ts +3 -0
- package/dist/data-grid/index.d.ts.map +1 -0
- package/dist/data-grid/index.js +2 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/discover/discover.css +60 -0
- package/dist/discover/discover.d.ts +33 -0
- package/dist/discover/discover.d.ts.map +1 -0
- package/dist/discover/discover.js +13 -0
- package/dist/discover/discover.js.map +1 -0
- package/dist/discover/index.d.ts +4 -0
- package/dist/discover/index.d.ts.map +1 -0
- package/dist/discover/index.js +3 -0
- package/dist/discover/index.js.map +1 -0
- package/dist/file-grid/file-grid.css +5 -0
- package/dist/file-grid/file-grid.d.ts +10 -3
- package/dist/file-grid/file-grid.d.ts.map +1 -1
- package/dist/file-grid/file-grid.js +6 -5
- package/dist/file-grid/file-grid.js.map +1 -1
- package/dist/floating-bar/floating-bar.css +104 -17
- package/dist/floating-bar/floating-bar.d.ts +21 -2
- package/dist/floating-bar/floating-bar.d.ts.map +1 -1
- package/dist/floating-bar/floating-bar.js +53 -47
- package/dist/floating-bar/floating-bar.js.map +1 -1
- package/dist/font-picker/font-picker.css +41 -0
- package/dist/font-picker/font-picker.d.ts +59 -0
- package/dist/font-picker/font-picker.d.ts.map +1 -0
- package/dist/font-picker/font-picker.js +155 -0
- package/dist/font-picker/font-picker.js.map +1 -0
- package/dist/font-picker/index.d.ts +3 -0
- package/dist/font-picker/index.d.ts.map +1 -0
- package/dist/font-picker/index.js +2 -0
- package/dist/font-picker/index.js.map +1 -0
- package/dist/hint/hint.css +51 -0
- package/dist/hint/hint.d.ts +33 -0
- package/dist/hint/hint.d.ts.map +1 -0
- package/dist/hint/hint.js +80 -0
- package/dist/hint/hint.js.map +1 -0
- package/dist/hint/index.d.ts +4 -0
- package/dist/hint/index.d.ts.map +1 -0
- package/dist/hint/index.js +3 -0
- package/dist/hint/index.js.map +1 -0
- package/dist/icon/glyphs.d.ts +18 -0
- package/dist/icon/glyphs.d.ts.map +1 -0
- package/dist/icon/glyphs.js +17 -0
- package/dist/icon/glyphs.js.map +1 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.d.ts.map +1 -1
- package/dist/icon/index.js +1 -0
- package/dist/icon/index.js.map +1 -1
- package/dist/index.d.ts +44 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.d.ts +1 -1
- package/dist/inspector/index.d.ts.map +1 -1
- package/dist/inspector/inspector.css +197 -2
- package/dist/inspector/inspector.d.ts +83 -5
- package/dist/inspector/inspector.d.ts.map +1 -1
- package/dist/inspector/inspector.js +41 -8
- package/dist/inspector/inspector.js.map +1 -1
- package/dist/look-picker/index.d.ts +3 -0
- package/dist/look-picker/index.d.ts.map +1 -0
- package/dist/look-picker/index.js +2 -0
- package/dist/look-picker/index.js.map +1 -0
- package/dist/look-picker/look-picker.css +150 -0
- package/dist/look-picker/look-picker.d.ts +72 -0
- package/dist/look-picker/look-picker.d.ts.map +1 -0
- package/dist/look-picker/look-picker.js +91 -0
- package/dist/look-picker/look-picker.js.map +1 -0
- package/dist/look-thumb/index.d.ts +3 -0
- package/dist/look-thumb/index.d.ts.map +1 -0
- package/dist/look-thumb/index.js +2 -0
- package/dist/look-thumb/index.js.map +1 -0
- package/dist/look-thumb/look-thumb.css +7 -0
- package/dist/look-thumb/look-thumb.d.ts +27 -0
- package/dist/look-thumb/look-thumb.d.ts.map +1 -0
- package/dist/look-thumb/look-thumb.js +15 -0
- package/dist/look-thumb/look-thumb.js.map +1 -0
- package/dist/material/index.d.ts +3 -0
- package/dist/material/index.d.ts.map +1 -0
- package/dist/material/index.js +2 -0
- package/dist/material/index.js.map +1 -0
- package/dist/material/material.css +371 -0
- package/dist/material/material.d.ts +43 -0
- package/dist/material/material.d.ts.map +1 -0
- package/dist/material/material.js +27 -0
- package/dist/material/material.js.map +1 -0
- package/dist/number-field/number-field.css +21 -0
- package/dist/number-field/number-field.d.ts +24 -3
- package/dist/number-field/number-field.d.ts.map +1 -1
- package/dist/number-field/number-field.js +52 -9
- package/dist/number-field/number-field.js.map +1 -1
- package/dist/on-media/on-media.css +6 -6
- package/dist/page-editor/page-editor.css +2 -6
- package/dist/picker/picker.css +42 -0
- package/dist/picker/picker.d.ts +10 -1
- package/dist/picker/picker.d.ts.map +1 -1
- package/dist/picker/picker.js +40 -5
- package/dist/picker/picker.js.map +1 -1
- package/dist/pop-menu/index.d.ts +7 -0
- package/dist/pop-menu/index.d.ts.map +1 -0
- package/dist/pop-menu/index.js +6 -0
- package/dist/pop-menu/index.js.map +1 -0
- package/dist/{floating-bar/menu.d.ts → pop-menu/pop-menu.d.ts} +8 -2
- package/dist/pop-menu/pop-menu.d.ts.map +1 -0
- package/dist/{floating-bar/menu.js → pop-menu/pop-menu.js} +39 -11
- package/dist/pop-menu/pop-menu.js.map +1 -0
- package/dist/prompt-field/index.d.ts +3 -0
- package/dist/prompt-field/index.d.ts.map +1 -0
- package/dist/prompt-field/index.js +2 -0
- package/dist/prompt-field/index.js.map +1 -0
- package/dist/prompt-field/prompt-field.css +203 -0
- package/dist/prompt-field/prompt-field.d.ts +72 -0
- package/dist/prompt-field/prompt-field.d.ts.map +1 -0
- package/dist/prompt-field/prompt-field.js +91 -0
- package/dist/prompt-field/prompt-field.js.map +1 -0
- package/dist/quick-action/index.d.ts +1 -1
- package/dist/quick-action/index.d.ts.map +1 -1
- package/dist/quick-action/quick-action.css +60 -17
- package/dist/quick-action/quick-action.d.ts +34 -28
- package/dist/quick-action/quick-action.d.ts.map +1 -1
- package/dist/quick-action/quick-action.js +25 -21
- package/dist/quick-action/quick-action.js.map +1 -1
- package/dist/row-list/row-list.css +3 -0
- package/dist/seed-color-field/index.d.ts +3 -0
- package/dist/seed-color-field/index.d.ts.map +1 -0
- package/dist/seed-color-field/index.js +2 -0
- package/dist/seed-color-field/index.js.map +1 -0
- package/dist/seed-color-field/seed-color-field.css +103 -0
- package/dist/seed-color-field/seed-color-field.d.ts +45 -0
- package/dist/seed-color-field/seed-color-field.d.ts.map +1 -0
- package/dist/seed-color-field/seed-color-field.js +130 -0
- package/dist/seed-color-field/seed-color-field.js.map +1 -0
- package/dist/seed-dark-limit-field/index.d.ts +3 -0
- package/dist/seed-dark-limit-field/index.d.ts.map +1 -0
- package/dist/seed-dark-limit-field/index.js +2 -0
- package/dist/seed-dark-limit-field/index.js.map +1 -0
- package/dist/seed-dark-limit-field/seed-dark-limit-field.css +10 -0
- package/dist/seed-dark-limit-field/seed-dark-limit-field.d.ts +36 -0
- package/dist/seed-dark-limit-field/seed-dark-limit-field.d.ts.map +1 -0
- package/dist/seed-dark-limit-field/seed-dark-limit-field.js +18 -0
- package/dist/seed-dark-limit-field/seed-dark-limit-field.js.map +1 -0
- package/dist/seed-roundness-field/index.d.ts +3 -0
- package/dist/seed-roundness-field/index.d.ts.map +1 -0
- package/dist/seed-roundness-field/index.js +2 -0
- package/dist/seed-roundness-field/index.js.map +1 -0
- package/dist/seed-roundness-field/seed-roundness-field.css +23 -0
- package/dist/seed-roundness-field/seed-roundness-field.d.ts +39 -0
- package/dist/seed-roundness-field/seed-roundness-field.d.ts.map +1 -0
- package/dist/seed-roundness-field/seed-roundness-field.js +15 -0
- package/dist/seed-roundness-field/seed-roundness-field.js.map +1 -0
- package/dist/seed-steps/index.d.ts +8 -0
- package/dist/seed-steps/index.d.ts.map +1 -0
- package/dist/seed-steps/index.js +7 -0
- package/dist/seed-steps/index.js.map +1 -0
- package/dist/seed-steps/reset-focus.d.ts +16 -0
- package/dist/seed-steps/reset-focus.d.ts.map +1 -0
- package/dist/seed-steps/reset-focus.js +53 -0
- package/dist/seed-steps/reset-focus.js.map +1 -0
- package/dist/seed-steps/seed-steps.css +83 -0
- package/dist/seed-steps/seed-steps.d.ts +47 -0
- package/dist/seed-steps/seed-steps.d.ts.map +1 -0
- package/dist/seed-steps/seed-steps.js +95 -0
- package/dist/seed-steps/seed-steps.js.map +1 -0
- package/dist/shell/shell.css +1 -13
- package/dist/skeleton/index.d.ts +3 -0
- package/dist/skeleton/index.d.ts.map +1 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/skeleton.css +84 -0
- package/dist/skeleton/skeleton.d.ts +50 -0
- package/dist/skeleton/skeleton.d.ts.map +1 -0
- package/dist/skeleton/skeleton.js +25 -0
- package/dist/skeleton/skeleton.js.map +1 -0
- package/dist/slide-list/index.d.ts +1 -1
- package/dist/slide-list/index.d.ts.map +1 -1
- package/dist/slide-list/slide-list.css +281 -23
- package/dist/slide-list/slide-list.d.ts +87 -1
- package/dist/slide-list/slide-list.d.ts.map +1 -1
- package/dist/slide-list/slide-list.js +265 -19
- package/dist/slide-list/slide-list.js.map +1 -1
- package/dist/split/split.css +10 -12
- package/dist/split/split.d.ts +2 -0
- package/dist/split/split.d.ts.map +1 -1
- package/dist/split/split.js +21 -3
- package/dist/split/split.js.map +1 -1
- package/dist/stage/stage.d.ts +11 -4
- package/dist/stage/stage.d.ts.map +1 -1
- package/dist/stage/stage.js +30 -9
- package/dist/stage/stage.js.map +1 -1
- package/dist/step-list/index.d.ts +3 -0
- package/dist/step-list/index.d.ts.map +1 -0
- package/dist/step-list/index.js +2 -0
- package/dist/step-list/index.js.map +1 -0
- package/dist/step-list/step-list.css +151 -0
- package/dist/step-list/step-list.d.ts +101 -0
- package/dist/step-list/step-list.d.ts.map +1 -0
- package/dist/step-list/step-list.js +76 -0
- package/dist/step-list/step-list.js.map +1 -0
- package/dist/suggestion/index.d.ts +3 -0
- package/dist/suggestion/index.d.ts.map +1 -0
- package/dist/suggestion/index.js +2 -0
- package/dist/suggestion/index.js.map +1 -0
- package/dist/suggestion/suggestion.css +45 -0
- package/dist/suggestion/suggestion.d.ts +23 -0
- package/dist/suggestion/suggestion.d.ts.map +1 -0
- package/dist/suggestion/suggestion.js +45 -0
- package/dist/suggestion/suggestion.js.map +1 -0
- package/dist/switch/switch.css +1 -6
- package/dist/text-field/text-field.css +11 -2
- package/dist/thread/thread.css +9 -49
- package/dist/thread/thread.d.ts.map +1 -1
- package/dist/thread/thread.js +45 -46
- package/dist/thread/thread.js.map +1 -1
- package/dist/tile-picker/index.d.ts +1 -1
- package/dist/tile-picker/index.d.ts.map +1 -1
- package/dist/tile-picker/tile-picker.css +74 -10
- package/dist/tile-picker/tile-picker.d.ts +74 -7
- package/dist/tile-picker/tile-picker.d.ts.map +1 -1
- package/dist/tile-picker/tile-picker.js +82 -35
- package/dist/tile-picker/tile-picker.js.map +1 -1
- package/dist/tile-search/index.d.ts +7 -0
- package/dist/tile-search/index.d.ts.map +1 -0
- package/dist/tile-search/index.js +7 -0
- package/dist/tile-search/index.js.map +1 -0
- package/dist/tile-search/narrow.d.ts +22 -0
- package/dist/tile-search/narrow.d.ts.map +1 -0
- package/dist/tile-search/narrow.js +62 -0
- package/dist/tile-search/narrow.js.map +1 -0
- package/dist/tile-search/search-box.d.ts +19 -0
- package/dist/tile-search/search-box.d.ts.map +1 -0
- package/dist/tile-search/search-box.js +47 -0
- package/dist/tile-search/search-box.js.map +1 -0
- package/dist/tooltip/tooltip.css +13 -20
- package/dist/tooltip/tooltip.d.ts +2 -2
- package/dist/tooltip/tooltip.d.ts.map +1 -1
- package/dist/tooltip/tooltip.js +15 -2
- package/dist/tooltip/tooltip.js.map +1 -1
- package/dist/workbench/workbench.css +129 -16
- package/dist/workbench/workbench.d.ts +10 -2
- package/dist/workbench/workbench.d.ts.map +1 -1
- package/dist/workbench/workbench.js +8 -2
- package/dist/workbench/workbench.js.map +1 -1
- package/package.json +81 -1
- package/dist/floating-bar/menu.d.ts.map +0 -1
- package/dist/floating-bar/menu.js.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* StepList -- blueprint components/step-list.md. A file's history, newest first: a face, what the step did, who and
|
|
2
|
+
* when; a more menu per row (FloatingBar's menu: import floating-bar.css), and the warning that asks before an action
|
|
3
|
+
* goes ahead. Avatar draws the face (import avatar.css), Button the presses.
|
|
4
|
+
*
|
|
5
|
+
* LENGTHS IT DECIDES:
|
|
6
|
+
* 1.75rem the face, as Faces' default; and the more button, as FileGrid's
|
|
7
|
+
* 0.875rem the person's face on an operator's glyph face, half the face; 2px its ring of surface.primary, and
|
|
8
|
+
* -2px how far it stands past the glyph face's corner
|
|
9
|
+
* 2px the current step's edge at its start, text.accent, as VersionTrail's current version; the gap between
|
|
10
|
+
* the label and the meta line; the list's own focus ring, 2px outside it
|
|
11
|
+
* 1px the hairline under each row; the more button's focus ring stands 1px off it
|
|
12
|
+
* 1px the spoken pause between name and time: a box hidden from sight, said, never seen */
|
|
13
|
+
.newtone-step-list {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
}
|
|
18
|
+
/* The list takes the focus only when a row that held it goes (tabindex -1): ringed when the keys brought it there. */
|
|
19
|
+
.newtone-step-list:focus {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
.newtone-step-list:focus-visible {
|
|
23
|
+
outline: 2px solid var(--newtone-role-text-accent);
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
.newtone-step-list-steps {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
list-style: none;
|
|
32
|
+
}
|
|
33
|
+
.newtone-step-list-step {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: var(--newtone-space-2);
|
|
37
|
+
padding-block: var(--newtone-space-2);
|
|
38
|
+
padding-inline: var(--newtone-space-2) var(--newtone-space-1);
|
|
39
|
+
border-block-end: 1px solid var(--newtone-role-divider-secondary);
|
|
40
|
+
border-inline-start: 2px solid transparent;
|
|
41
|
+
}
|
|
42
|
+
.newtone-step-list-step[data-current] {
|
|
43
|
+
border-inline-start-color: var(--newtone-role-text-accent);
|
|
44
|
+
}
|
|
45
|
+
.newtone-step-list-row {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: flex-start;
|
|
48
|
+
gap: var(--newtone-space-2);
|
|
49
|
+
min-inline-size: 0;
|
|
50
|
+
}
|
|
51
|
+
.newtone-step-list-text {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex: 1 1 auto;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 2px;
|
|
56
|
+
min-inline-size: 0;
|
|
57
|
+
overflow-wrap: anywhere;
|
|
58
|
+
}
|
|
59
|
+
/* An operator's step: its glyph on surface.secondary in the accent, the person's small face at its end-bottom corner. */
|
|
60
|
+
.newtone-step-list-operator {
|
|
61
|
+
position: relative;
|
|
62
|
+
flex: none;
|
|
63
|
+
display: grid;
|
|
64
|
+
place-items: center;
|
|
65
|
+
inline-size: 1.75rem;
|
|
66
|
+
block-size: 1.75rem;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
background: var(--newtone-role-surface-secondary);
|
|
69
|
+
color: var(--newtone-role-text-accent);
|
|
70
|
+
}
|
|
71
|
+
.newtone-step-list-for {
|
|
72
|
+
position: absolute;
|
|
73
|
+
inset-block-end: -2px;
|
|
74
|
+
inset-inline-end: -2px;
|
|
75
|
+
box-shadow: 0 0 0 2px var(--newtone-role-surface-primary);
|
|
76
|
+
}
|
|
77
|
+
/* Between the name and the time: a dot seen, a comma said. */
|
|
78
|
+
.newtone-step-list-pause {
|
|
79
|
+
position: absolute;
|
|
80
|
+
inline-size: 1px;
|
|
81
|
+
block-size: 1px;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
clip-path: inset(50%);
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
}
|
|
86
|
+
.newtone-step-list-label {
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: var(--newtone-space-1);
|
|
90
|
+
}
|
|
91
|
+
.newtone-step-list-kind {
|
|
92
|
+
flex: none;
|
|
93
|
+
color: var(--newtone-role-text-secondary);
|
|
94
|
+
}
|
|
95
|
+
.newtone-step-list-more {
|
|
96
|
+
flex: none;
|
|
97
|
+
display: grid;
|
|
98
|
+
place-items: center;
|
|
99
|
+
inline-size: 1.75rem;
|
|
100
|
+
block-size: 1.75rem;
|
|
101
|
+
padding: 0;
|
|
102
|
+
border: 0;
|
|
103
|
+
border-radius: var(--newtone-radius-sm);
|
|
104
|
+
background: none;
|
|
105
|
+
color: var(--newtone-role-text-secondary);
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
.newtone-step-list-more:hover,
|
|
109
|
+
.newtone-step-list-more[aria-expanded='true'] {
|
|
110
|
+
background: var(--newtone-role-surface-secondary);
|
|
111
|
+
color: var(--newtone-role-text-primary);
|
|
112
|
+
}
|
|
113
|
+
.newtone-step-list-more:focus-visible {
|
|
114
|
+
outline: 2px solid var(--newtone-role-text-accent);
|
|
115
|
+
outline-offset: 1px;
|
|
116
|
+
}
|
|
117
|
+
/* The warning: under the row, on the secondary surface, its presses under its words. */
|
|
118
|
+
.newtone-step-list-confirm {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: var(--newtone-space-2);
|
|
122
|
+
margin-inline-start: calc(1.75rem + var(--newtone-space-2));
|
|
123
|
+
padding: var(--newtone-space-2);
|
|
124
|
+
border-radius: var(--newtone-radius-md);
|
|
125
|
+
background: var(--newtone-role-surface-secondary);
|
|
126
|
+
}
|
|
127
|
+
.newtone-step-list-warning {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: flex-start;
|
|
130
|
+
gap: var(--newtone-space-2);
|
|
131
|
+
min-inline-size: 0;
|
|
132
|
+
}
|
|
133
|
+
.newtone-step-list-warning > .newtone-icon {
|
|
134
|
+
flex: none;
|
|
135
|
+
}
|
|
136
|
+
.newtone-step-list-presses {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-wrap: wrap;
|
|
139
|
+
gap: var(--newtone-space-2);
|
|
140
|
+
}
|
|
141
|
+
.newtone-step-list-empty {
|
|
142
|
+
padding: var(--newtone-space-3) var(--newtone-space-2);
|
|
143
|
+
}
|
|
144
|
+
.newtone-step-list-older {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: var(--newtone-space-1);
|
|
149
|
+
padding-block: var(--newtone-space-2);
|
|
150
|
+
text-align: center;
|
|
151
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { ExtendedPalette } from '../card-box/index.js';
|
|
3
|
+
/** Who took a step: their name, and their face as `Avatar` draws it. */
|
|
4
|
+
export interface StepListWho {
|
|
5
|
+
name: string;
|
|
6
|
+
/** Their picture. Without it, `initials` on their colour. */
|
|
7
|
+
src?: string;
|
|
8
|
+
initials?: string;
|
|
9
|
+
extended?: ExtendedPalette;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An operator that took the step for the person (Core *Architecture* rule 4: each step records who made it, the person
|
|
13
|
+
* or an operator such as Claude acting for them).
|
|
14
|
+
*/
|
|
15
|
+
export interface StepListOperator {
|
|
16
|
+
/** Said in place of the person's name, in the consumer's words for both: "Claude for Ana". */
|
|
17
|
+
label: string;
|
|
18
|
+
/** The `Icon` name drawn as the step's face; the assistant's (`auto_awesome`) unless given. */
|
|
19
|
+
icon?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Something to do with a step: a row of its more menu. */
|
|
22
|
+
export interface StepListAction {
|
|
23
|
+
id: string;
|
|
24
|
+
/** Its words: "Undo this change", "Restore this version". */
|
|
25
|
+
label: string;
|
|
26
|
+
/** An `Icon` name before its words. */
|
|
27
|
+
icon?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** A question under a step before an action goes ahead (a built-on step: "Ana's later changes to it go back too."). */
|
|
31
|
+
export interface StepListConfirm {
|
|
32
|
+
/** What it warns of, naming whose changes go back. */
|
|
33
|
+
message: ReactNode;
|
|
34
|
+
/** The press that goes ahead: "Undo anyway". */
|
|
35
|
+
confirm: string;
|
|
36
|
+
/** The press that does not: "Cancel". */
|
|
37
|
+
cancel: string;
|
|
38
|
+
}
|
|
39
|
+
export interface StepListStep {
|
|
40
|
+
/** Unique in the list: the step's number, as the consumer keeps it. */
|
|
41
|
+
id: string;
|
|
42
|
+
/** What the step did, in the consumer's words: "Changed the title", "Undone: Changed the title", "Restored to 10:42". */
|
|
43
|
+
label: string;
|
|
44
|
+
who: StepListWho;
|
|
45
|
+
/**
|
|
46
|
+
* Given, an operator took the step for `who`: its glyph is the face, `who`'s face small on it, and `operator.label`
|
|
47
|
+
* is said in place of `who.name`.
|
|
48
|
+
*/
|
|
49
|
+
operator?: StepListOperator;
|
|
50
|
+
/** When, in the consumer's words: "2 min ago", "Today, 10:42". */
|
|
51
|
+
when: string;
|
|
52
|
+
/** The same moment for a machine (ISO 8601), on the `<time>` that holds `when`. */
|
|
53
|
+
at?: string;
|
|
54
|
+
/**
|
|
55
|
+
* What kind of step it is, beyond an edit: `undo`, it undid another step; `restore`, it put the whole file back to
|
|
56
|
+
* a moment. A glyph before its label (`undo`, `history`); the label still says it.
|
|
57
|
+
*/
|
|
58
|
+
kind?: 'undo' | 'restore';
|
|
59
|
+
/**
|
|
60
|
+
* Taken back since (a later step undid it): the consumer's words for that ("Undone by Ana"). Given, its label is
|
|
61
|
+
* struck through and these words stand under it.
|
|
62
|
+
*/
|
|
63
|
+
takenBack?: string;
|
|
64
|
+
/** The moment the file stands at now: an accent edge at its start. */
|
|
65
|
+
current?: boolean;
|
|
66
|
+
/** Its more menu's rows. None, no menu. */
|
|
67
|
+
actions?: StepListAction[];
|
|
68
|
+
/** Given, the warning under the row, asking before an action goes ahead. The consumer sets and clears it. */
|
|
69
|
+
confirm?: StepListConfirm;
|
|
70
|
+
}
|
|
71
|
+
export interface StepListProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
72
|
+
/** The list's name, for assistive tech: "History". */
|
|
73
|
+
label: string;
|
|
74
|
+
/** The steps, newest first. */
|
|
75
|
+
steps: StepListStep[];
|
|
76
|
+
/** The more button's name, said with the step's label: "More" → "More: Changed the title". */
|
|
77
|
+
moreLabel: string;
|
|
78
|
+
/** A row of a step's more menu picked. */
|
|
79
|
+
onAction?: (stepId: string, actionId: string) => void;
|
|
80
|
+
/** A warning's confirm pressed. */
|
|
81
|
+
onConfirm?: (stepId: string) => void;
|
|
82
|
+
/** A warning's cancel pressed, or Escape in it. */
|
|
83
|
+
onCancel?: (stepId: string) => void;
|
|
84
|
+
/** What is said where there are no steps yet. */
|
|
85
|
+
empty?: string;
|
|
86
|
+
/**
|
|
87
|
+
* A press at the list's end that shows older steps (a page past the last shown): "Show older". `note`: words under
|
|
88
|
+
* it where the list ends, for why nothing older can be had ("Versions before the last 500 steps can't be restored").
|
|
89
|
+
* `disabled` (loading the next page, or nothing older left): the press waits, Button's `disabledFocusable`
|
|
90
|
+
* (`aria-disabled`, its press ignored), never the native state, which would drop a focus it holds to the page.
|
|
91
|
+
*/
|
|
92
|
+
older?: {
|
|
93
|
+
label: string;
|
|
94
|
+
onPress: () => void;
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
note?: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/** A file's history, newest first: who did what, when, and what can be done with each step. Blueprint components/step-list.md. */
|
|
100
|
+
export declare function StepList({ label, steps, moreLabel, onAction, onConfirm, onCancel, empty, older, className, ...rest }: StepListProps): import("react").JSX.Element;
|
|
101
|
+
//# sourceMappingURL=step-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-list.d.ts","sourceRoot":"","sources":["../../src/step-list/step-list.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAsC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAG/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAM3D,wEAAwE;AACxE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,8FAA8F;IAC9F,KAAK,EAAE,MAAM,CAAA;IACb,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAA;IACb,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,uHAAuH;AACvH,MAAM,WAAW,eAAe;IAC5B,sDAAsD;IACtD,OAAO,EAAE,SAAS,CAAA;IAClB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IACzB,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAA;IACV,yHAAyH;IACzH,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,WAAW,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CA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,EACV,EAAE,aAAa,+BA2Df"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// A file's history, step by step, newest first (2026-11-13, the HuevOS rebuild's History: Slides, Vector, Style Book).
|
|
4
|
+
// Each row: the face of who took the step, what it did, and who and when under it; a step that undid another or put the
|
|
5
|
+
// file back to a moment says so with a glyph; a step taken back since is struck through, with the consumer's words for
|
|
6
|
+
// it. Each row's actions (Undo this change, Restore this version) are the consumer's, in a more menu at its end. Before
|
|
7
|
+
// an action goes ahead, the consumer may ask under the row: an inline warning naming whose later changes go back, with
|
|
8
|
+
// its own two presses (Undo anyway, Cancel); when it closes, the focus goes back to the row's more button. A step an
|
|
9
|
+
// operator took for the person (Claude, acting for Ana) wears the operator's glyph as its face, the person's small
|
|
10
|
+
// face on it, and the consumer's words for both. Every word is the consumer's. Blueprint components/step-list.md.
|
|
11
|
+
import { useEffect, useLayoutEffect, useRef } from 'react';
|
|
12
|
+
import { Avatar } from '../avatar/index.js';
|
|
13
|
+
import { Button } from '../button/index.js';
|
|
14
|
+
import { Icon } from '../icon/index.js';
|
|
15
|
+
import { Text } from '../text/index.js';
|
|
16
|
+
import { PopMenuRows, usePopMenu } from '../pop-menu/index.js';
|
|
17
|
+
import { useResetFocus } from '../seed-steps/index.js';
|
|
18
|
+
/** A file's history, newest first: who did what, when, and what can be done with each step. Blueprint components/step-list.md. */
|
|
19
|
+
export function StepList({ label, steps, moreLabel, onAction, onConfirm, onCancel, empty, older, className, ...rest }) {
|
|
20
|
+
const list = useRef(null);
|
|
21
|
+
// A row that goes while the focus is in it gives the focus to the list, never to the page.
|
|
22
|
+
const lost = () => setTimeout(() => {
|
|
23
|
+
const at = document.activeElement;
|
|
24
|
+
if (!at || at === document.body)
|
|
25
|
+
list.current?.focus({ preventScroll: true });
|
|
26
|
+
});
|
|
27
|
+
// Show older going while it holds the focus (the consumer drops `older` rather than disabling it): the list takes
|
|
28
|
+
// the focus, as it does from a row that goes.
|
|
29
|
+
const { press: olderPress } = useResetFocus(!!older, () => list.current);
|
|
30
|
+
return (_jsxs("section", { ...rest, ref: list, tabIndex: -1, className: ['newtone-step-list', className].filter(Boolean).join(' '), "aria-label": label, children: [steps.length ? (_jsx("ol", { className: "newtone-step-list-steps", children: steps.map((s) => (_jsx(Step, { step: s, moreLabel: moreLabel, onAction: onAction, onConfirm: onConfirm, onCancel: onCancel, onLost: lost }, s.id))) })) : empty ? (_jsx(Text, { as: "p", scale: "body-sm", tone: "secondary", className: "newtone-step-list-empty", children: empty })) : null, older ? (_jsxs("div", { className: "newtone-step-list-older", children: [_jsx(Button, { size: "sm", variant: "tertiary", className: "newtone-step-list-older-press", disabledFocusable: older.disabled, ...olderPress, onClick: () => older.onPress(), children: older.label }), older.note ? (_jsx(Text, { as: "p", scale: "caption", tone: "secondary", children: older.note })) : null] })) : null] }));
|
|
31
|
+
}
|
|
32
|
+
// The glyph a kind of step wears before its label. A literal per kind, so a consumer's icon subsetting finds every name.
|
|
33
|
+
const KIND = { undo: 'undo', restore: 'history' };
|
|
34
|
+
function Step({ step: s, moreLabel, onAction, onConfirm, onCancel, onLost, }) {
|
|
35
|
+
const pop = usePopMenu('below', 'menu');
|
|
36
|
+
const row = useRef(null);
|
|
37
|
+
const presses = useRef(null);
|
|
38
|
+
// The warning takes the focus as it opens, on its safe press (the last), so it is read and Enter does not go ahead
|
|
39
|
+
// by chance. As it closes (either press, Escape, or the consumer clearing it), a focus it held goes back to the
|
|
40
|
+
// row's more button, or to the list where the row has none.
|
|
41
|
+
const asking = !!s.confirm;
|
|
42
|
+
const asked = useRef(false);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (asking)
|
|
45
|
+
presses.current?.querySelector('button:last-child')?.focus();
|
|
46
|
+
else if (asked.current) {
|
|
47
|
+
const at = document.activeElement;
|
|
48
|
+
if (!at || at === document.body || row.current?.contains(at)) {
|
|
49
|
+
if (pop.button.ref.current)
|
|
50
|
+
pop.button.ref.current.focus();
|
|
51
|
+
else
|
|
52
|
+
onLost();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
asked.current = asking;
|
|
56
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
57
|
+
}, [asking]);
|
|
58
|
+
// The row itself going while the focus is in it (a step dropped from the list): the list takes it.
|
|
59
|
+
useLayoutEffect(() => {
|
|
60
|
+
const li = row.current;
|
|
61
|
+
return () => {
|
|
62
|
+
if (li?.contains(document.activeElement))
|
|
63
|
+
onLost();
|
|
64
|
+
};
|
|
65
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
|
+
}, []);
|
|
67
|
+
const more = `${moreLabel}: ${s.label}`;
|
|
68
|
+
return (_jsxs("li", { ref: row, className: "newtone-step-list-step", "data-taken-back": s.takenBack ? '' : undefined, "data-current": s.current ? '' : undefined, "aria-current": s.current ? 'step' : undefined, children: [_jsxs("div", { className: "newtone-step-list-row", children: [s.operator ? (_jsxs("span", { className: "newtone-step-list-face newtone-step-list-operator", children: [_jsx(Icon, { name: s.operator.icon ?? 'auto_awesome', size: "sm", fill: true }), _jsx(Avatar, { className: "newtone-step-list-for", alt: "", src: s.who.src, initials: s.who.initials, extended: s.who.extended, size: "0.875rem" })] })) : (_jsx(Avatar, { className: "newtone-step-list-face", alt: "", src: s.who.src, initials: s.who.initials, extended: s.who.extended, size: "1.75rem" })), _jsxs("div", { className: "newtone-step-list-text", children: [_jsxs(Text, { as: "span", scale: "body-sm", weight: "medium", tone: s.takenBack ? 'secondary' : undefined, struck: !!s.takenBack, className: "newtone-step-list-label", children: [s.kind ? (_jsx(Icon, { name: KIND[s.kind], size: "sm", className: "newtone-step-list-kind" })) : null, s.label] }), _jsxs(Text, { as: "span", scale: "caption", tone: "secondary", className: "newtone-step-list-meta", children: [s.operator ? s.operator.label : s.who.name, _jsx("span", { "aria-hidden": "true", children: " \u00B7 " }), _jsx("span", { className: "newtone-step-list-pause", children: ", " }), s.at ? _jsx("time", { dateTime: s.at, children: s.when }) : s.when] }), s.takenBack ? (_jsx(Text, { as: "span", scale: "caption", tone: "secondary", className: "newtone-step-list-taken", children: s.takenBack })) : null] }), s.actions?.length ? (_jsxs(_Fragment, { children: [_jsx("button", { ...pop.button, className: "newtone-step-list-more", "aria-label": more, title: moreLabel, children: _jsx(Icon, { name: "more_horiz", size: "sm" }) }), _jsx("div", { ...pop.menu, "aria-label": more, children: pop.open ? (_jsx(PopMenuRows, { items: s.actions, onPick: (id) => pop.done(() => onAction?.(s.id, id)) })) : null })] })) : null] }), s.confirm ? (_jsxs("div", { className: "newtone-step-list-confirm", role: "group", "aria-label": s.label, onKeyDown: (e) => {
|
|
69
|
+
if (e.key !== 'Escape')
|
|
70
|
+
return;
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
onCancel?.(s.id);
|
|
74
|
+
}, children: [_jsxs("div", { className: "newtone-step-list-warning", role: "alert", children: [_jsx(Icon, { name: "warning", size: "sm", tone: "warning" }), _jsx(Text, { as: "p", scale: "body-sm", children: s.confirm.message })] }), _jsxs("div", { ref: presses, className: "newtone-step-list-presses", children: [_jsx(Button, { size: "sm", variant: "secondary", onClick: () => onConfirm?.(s.id), children: s.confirm.confirm }), _jsx(Button, { size: "sm", variant: "tertiary", onClick: () => onCancel?.(s.id), children: s.confirm.cancel })] })] })) : null] }));
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=step-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-list.js","sourceRoot":"","sources":["../../src/step-list/step-list.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ,uHAAuH;AACvH,wHAAwH;AACxH,uHAAuH;AACvH,wHAAwH;AACxH,uHAAuH;AACvH,qHAAqH;AACrH,mHAAmH;AACnH,kHAAkH;AAElH,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAuC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,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YACjE,CAAC,CAAC,OAAO,CAAC,OAAO,GACb,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YAC/D,CAAC,CAAC,OAAO,CAAC,MAAM,GACZ,IACP,IACJ,CACT,CAAC,CAAC,CAAC,IAAI,IACP,CACR,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* Suggestion -- blueprint components/suggestion.md. What the system proposes, inline: the assistant's glyph in the
|
|
2
|
+
* accent, the words, then Accept and Dismiss (Button: import button.css; busy, they wait as Button's own
|
|
3
|
+
* `disabledFocusable`, drawn by button.css), wrapping under the words when the line is
|
|
4
|
+
* too narrow for both. On the secondary surface, radius.md, as a quiet note beside what it is about. Solid always: it
|
|
5
|
+
* is content's companion, never a control over moving content (material.N2).
|
|
6
|
+
*
|
|
7
|
+
* LENGTHS IT DECIDES:
|
|
8
|
+
* 12rem the least the words keep before the presses wrap under them
|
|
9
|
+
* 1px the said-once region's box, hidden from sight and out of the row's flow (absolute), so it adds no gap */
|
|
10
|
+
.newtone-suggestion {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--newtone-space-2);
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
padding: var(--newtone-space-2) var(--newtone-space-3);
|
|
18
|
+
border-radius: var(--newtone-radius-md);
|
|
19
|
+
background: var(--newtone-role-surface-secondary);
|
|
20
|
+
color: var(--newtone-role-text-primary);
|
|
21
|
+
}
|
|
22
|
+
.newtone-suggestion-said {
|
|
23
|
+
position: absolute;
|
|
24
|
+
inline-size: 1px;
|
|
25
|
+
block-size: 1px;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
clip-path: inset(50%);
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
.newtone-suggestion-glyph {
|
|
31
|
+
flex: none;
|
|
32
|
+
}
|
|
33
|
+
.newtone-suggestion-words {
|
|
34
|
+
flex: 1 1 12rem;
|
|
35
|
+
min-inline-size: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
overflow-wrap: anywhere;
|
|
38
|
+
}
|
|
39
|
+
.newtone-suggestion-presses {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex: none;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
gap: var(--newtone-space-1);
|
|
44
|
+
margin-inline-start: auto;
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface SuggestionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/** What it is, for assistive tech, with what it is about: "Suggestion for IMG_2041.jpg". */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The suggestion, in the consumer's words: "Rename to Q3 report.pdf". A name or a place may be `<strong>`. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** The press that applies it: "Accept", "Rename", "Move". */
|
|
8
|
+
acceptLabel: string;
|
|
9
|
+
/** The press that puts it away, changing nothing: "Dismiss". */
|
|
10
|
+
dismissLabel: string;
|
|
11
|
+
onAccept: () => void;
|
|
12
|
+
onDismiss: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* While accepting goes ahead: both presses wait (Button's `disabledFocusable`: `aria-disabled`, still focusable),
|
|
15
|
+
* and the row is `aria-busy`.
|
|
16
|
+
*/
|
|
17
|
+
busy?: boolean;
|
|
18
|
+
/** An `Icon` name in place of the assistant's glyph (`auto_awesome`), where it is not the assistant's. */
|
|
19
|
+
icon?: string;
|
|
20
|
+
}
|
|
21
|
+
/** An inline suggestion, accepted or dismissed. Blueprint components/suggestion.md. */
|
|
22
|
+
export declare function Suggestion({ label, children, acceptLabel, dismissLabel, onAccept, onDismiss, busy, icon, className, onFocus, ...rest }: SuggestionProps): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=suggestion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../src/suggestion/suggestion.tsx"],"names":[],"mappings":"AASA,OAAO,EAKH,KAAK,cAAc,EACnB,KAAK,SAAS,EACjB,MAAM,OAAO,CAAA;AAKd,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACrF,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,+GAA+G;IAC/G,QAAQ,EAAE,SAAS,CAAA;IACnB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAA;IACnB,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAgBD,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,IAAqB,EACrB,SAAS,EACT,OAAO,EACP,GAAG,IAAI,EACV,EAAE,eAAe,+BAsDjB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// What the system proposes for something the person already has, said inline beside it, which the person accepts or
|
|
4
|
+
// dismisses (2026-11-13, the HuevOS rebuild's uploads: a better name or place for a file just uploaded, "Rename to
|
|
5
|
+
// Q3 report.pdf", "Move to Clients › Acme"). It changes nothing by itself: the thing is already kept as the person
|
|
6
|
+
// placed it, and Accept is the only way the suggestion is applied. The glyph says it comes from the assistant; every
|
|
7
|
+
// word is the consumer's. As it arrives it is said once, politely, so a person who cannot see it appear still hears
|
|
8
|
+
// it, and said again whenever its words change (a new proposal in the same place); while busy its presses wait but
|
|
9
|
+
// keep the focus. Blueprint components/suggestion.md.
|
|
10
|
+
import { Children, isValidElement, useEffect, useState, } from 'react';
|
|
11
|
+
import { Button } from '../button/index.js';
|
|
12
|
+
import { Icon } from '../icon/index.js';
|
|
13
|
+
import { Text } from '../text/index.js';
|
|
14
|
+
// How long after it is drawn the suggestion is said: a live region is heard only once it is in the page before its
|
|
15
|
+
// words change, so it is drawn empty and filled a moment later.
|
|
16
|
+
const SAY_AFTER_MS = 100;
|
|
17
|
+
/** The words a node says: its text, its elements' children's text, in order. What is heard is what is compared. */
|
|
18
|
+
function wordsOf(node) {
|
|
19
|
+
let out = '';
|
|
20
|
+
Children.forEach(node, (n) => {
|
|
21
|
+
if (typeof n === 'string' || typeof n === 'number' || typeof n === 'bigint')
|
|
22
|
+
out += n;
|
|
23
|
+
else if (isValidElement(n))
|
|
24
|
+
out += wordsOf(n.props.children);
|
|
25
|
+
});
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
/** An inline suggestion, accepted or dismissed. Blueprint components/suggestion.md. */
|
|
29
|
+
export function Suggestion({ label, children, acceptLabel, dismissLabel, onAccept, onDismiss, busy, icon = 'auto_awesome', className, onFocus, ...rest }) {
|
|
30
|
+
// Said once as it arrives: `waiting` (drawn, still empty), `saying` (its label and words), `said` (emptied once the
|
|
31
|
+
// focus comes into it, so the words are not met twice). Words that change on the same instance (a consumer that
|
|
32
|
+
// keeps one Suggestion for each new proposal, unkeyed) are new: the region is emptied and says them again.
|
|
33
|
+
const [say, setSay] = useState('waiting');
|
|
34
|
+
const heard = `${label}: ${wordsOf(children)}`;
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
setSay('waiting');
|
|
37
|
+
const t = setTimeout(() => setSay((s) => (s === 'waiting' ? 'saying' : s)), SAY_AFTER_MS);
|
|
38
|
+
return () => clearTimeout(t);
|
|
39
|
+
}, [heard]);
|
|
40
|
+
return (_jsxs("div", { ...rest, role: "group", "aria-label": label, "aria-busy": busy || undefined, className: ['newtone-suggestion', className].filter(Boolean).join(' '), onFocus: (e) => {
|
|
41
|
+
setSay('said');
|
|
42
|
+
onFocus?.(e);
|
|
43
|
+
}, children: [_jsx("span", { role: "status", className: "newtone-suggestion-said", children: say === 'saying' ? (_jsxs(_Fragment, { children: [label, ": ", children] })) : null }), _jsx(Icon, { name: icon, size: "sm", tone: "accent", fill: true, className: "newtone-suggestion-glyph" }), _jsx(Text, { as: "p", scale: "body-sm", className: "newtone-suggestion-words", children: children }), _jsxs("span", { className: "newtone-suggestion-presses", children: [_jsx(Button, { size: "sm", variant: "secondary", disabledFocusable: busy, onClick: () => onAccept(), children: acceptLabel }), _jsx(Button, { size: "sm", variant: "tertiary", disabledFocusable: busy, onClick: () => onDismiss(), children: dismissLabel })] })] }));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=suggestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.js","sourceRoot":"","sources":["../../src/suggestion/suggestion.tsx"],"names":[],"mappings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AAI,EACT,OAAO,EAAC,WAAW,EACnB,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,YAExB,WAAW,GACP,EACT,KAAC,MAAM,IACH,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,UAAU,EAClB,iBAAiB,EAAE,IAAI,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,YAEzB,YAAY,GACR,IACN,IACL,CACT,CAAA;AACL,CAAC"}
|
package/dist/switch/switch.css
CHANGED
|
@@ -20,12 +20,7 @@
|
|
|
20
20
|
block-size: 1.125rem;
|
|
21
21
|
border-radius: 50%;
|
|
22
22
|
background: var(--newtone-role-surface-primary);
|
|
23
|
-
box-shadow:
|
|
24
|
-
color-mix(
|
|
25
|
-
in oklab,
|
|
26
|
-
var(--newtone-role-text-primary) var(--newtone-shadow-raised-strength-contact),
|
|
27
|
-
transparent
|
|
28
|
-
);
|
|
23
|
+
box-shadow: var(--_shadow-low);
|
|
29
24
|
transition: translate 120ms ease;
|
|
30
25
|
}
|
|
31
26
|
.newtone-switch:checked {
|
|
@@ -78,12 +78,21 @@
|
|
|
78
78
|
|
|
79
79
|
/* Disabled is drawn here because the box states its own fill, ink and border above, which takes the
|
|
80
80
|
* user agent's grey away from a disabled `<input>` -- so without this a disabled field looks
|
|
81
|
-
* editable. `button.json`'s `*-disabled-*` arrangement.
|
|
82
|
-
|
|
81
|
+
* editable. `button.json`'s `*-disabled-*` arrangement. A box that is `aria-disabled` (2026-11-13:
|
|
82
|
+
* FontPicker's, read-only but keeping the focus) is drawn the same, as Button's waiting press is. */
|
|
83
|
+
.newtone-text-field-box:is(:disabled, [aria-disabled='true']) {
|
|
83
84
|
background: var(--newtone-text-field-box-disabled-fill);
|
|
84
85
|
color: var(--newtone-text-field-box-disabled-text);
|
|
85
86
|
border-color: var(--newtone-text-field-box-disabled-border);
|
|
86
87
|
cursor: not-allowed;
|
|
88
|
+
/* A user agent's own fade on a natively disabled field (WebKit on iOS: its opacity and its text fill) is taken
|
|
89
|
+
* away, so it is these tokens alone, the same pixels on every device (CHARTER non-negotiable 8). */
|
|
90
|
+
opacity: 1;
|
|
91
|
+
-webkit-text-fill-color: currentColor;
|
|
92
|
+
}
|
|
93
|
+
/* The placeholder keeps its own ink, disabled too: it says its fill itself rather than take the box's. */
|
|
94
|
+
.newtone-text-field-box::placeholder {
|
|
95
|
+
-webkit-text-fill-color: currentColor;
|
|
87
96
|
}
|
|
88
97
|
|
|
89
98
|
.newtone-text-field-box:focus-visible {
|
package/dist/thread/thread.css
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/* Thread -- blueprint components/thread.md. A conversation of people about one thing.
|
|
2
2
|
*
|
|
3
3
|
* LENGTHS IT DECIDES:
|
|
4
|
-
* 28px a glyph button's box (more, resolve, close
|
|
4
|
+
* 28px a glyph button's box (more, resolve, close): smaller than a Control's least rung, since a thread sits in
|
|
5
5
|
* a card or a panel row among words at body-sm
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* space.3 between comments, and inside the thread's edges
|
|
7
|
+
*
|
|
8
|
+
* The box to write in is a PromptField `md` (Joshua 2026-11-11), which draws itself and grows to 8 lines. A thread that
|
|
9
|
+
* holds comments is solid, its box too; a new card, only its box, wears the menu's glass where a glass boundary is
|
|
10
|
+
* (material.css). */
|
|
11
|
+
@import '../prompt-field/prompt-field.css';
|
|
8
12
|
.newtone-thread {
|
|
9
13
|
display: flex;
|
|
10
14
|
flex-direction: column;
|
|
@@ -101,10 +105,6 @@
|
|
|
101
105
|
outline: 2px solid var(--newtone-role-text-accent);
|
|
102
106
|
outline-offset: -2px;
|
|
103
107
|
}
|
|
104
|
-
.newtone-thread-tiny[data-strong]:not(:disabled) {
|
|
105
|
-
background: var(--newtone-role-text-accent);
|
|
106
|
-
color: var(--newtone-role-surface-primary);
|
|
107
|
-
}
|
|
108
108
|
.newtone-thread-tiny:disabled {
|
|
109
109
|
color: var(--newtone-role-text-disabled);
|
|
110
110
|
cursor: default;
|
|
@@ -129,38 +129,6 @@
|
|
|
129
129
|
padding-block-start: 0;
|
|
130
130
|
border-block-start: 0;
|
|
131
131
|
}
|
|
132
|
-
.newtone-thread-compose-row {
|
|
133
|
-
display: flex;
|
|
134
|
-
align-items: flex-end;
|
|
135
|
-
gap: var(--newtone-space-2);
|
|
136
|
-
}
|
|
137
|
-
.newtone-thread-field {
|
|
138
|
-
flex: 1 1 auto;
|
|
139
|
-
box-sizing: border-box;
|
|
140
|
-
min-inline-size: 0;
|
|
141
|
-
max-block-size: calc(8lh + 2 * var(--newtone-space-2));
|
|
142
|
-
margin: 0;
|
|
143
|
-
padding: var(--newtone-space-1) var(--newtone-space-2);
|
|
144
|
-
border: 1px solid var(--newtone-role-divider-primary);
|
|
145
|
-
border-radius: var(--newtone-radius-sm);
|
|
146
|
-
outline: none;
|
|
147
|
-
resize: none;
|
|
148
|
-
overflow-y: auto;
|
|
149
|
-
background: transparent;
|
|
150
|
-
color: inherit;
|
|
151
|
-
font-family: var(--newtone-text-scale-body-sm-family);
|
|
152
|
-
font-variation-settings: var(--newtone-text-scale-body-sm-variation);
|
|
153
|
-
font-size: var(--newtone-text-scale-body-sm-size);
|
|
154
|
-
line-height: var(--newtone-text-scale-body-sm-leading);
|
|
155
|
-
letter-spacing: var(--newtone-text-scale-body-sm-tracking);
|
|
156
|
-
}
|
|
157
|
-
.newtone-thread-field:focus-visible,
|
|
158
|
-
.newtone-thread-field:focus {
|
|
159
|
-
border-color: var(--newtone-role-text-accent);
|
|
160
|
-
}
|
|
161
|
-
.newtone-thread-field::placeholder {
|
|
162
|
-
color: var(--newtone-role-text-secondary);
|
|
163
|
-
}
|
|
164
132
|
.newtone-thread-people {
|
|
165
133
|
position: absolute;
|
|
166
134
|
inset-inline: 0;
|
|
@@ -172,11 +140,7 @@
|
|
|
172
140
|
border-radius: var(--newtone-radius-md);
|
|
173
141
|
background: var(--newtone-role-surface-primary);
|
|
174
142
|
border: 1px solid var(--newtone-role-divider-secondary);
|
|
175
|
-
box-shadow:
|
|
176
|
-
0 var(--newtone-shadow-raised-contact-y) var(--newtone-shadow-raised-contact-blur)
|
|
177
|
-
color-mix(in oklab, var(--newtone-role-text-primary) var(--newtone-shadow-raised-strength-contact), transparent),
|
|
178
|
-
0 var(--newtone-shadow-raised-ambient-y) var(--newtone-shadow-raised-ambient-blur)
|
|
179
|
-
color-mix(in oklab, var(--newtone-role-text-primary) var(--newtone-shadow-raised-strength-ambient), transparent);
|
|
143
|
+
box-shadow: var(--_shadow-high);
|
|
180
144
|
}
|
|
181
145
|
.newtone-thread-person {
|
|
182
146
|
display: flex;
|
|
@@ -198,11 +162,7 @@
|
|
|
198
162
|
border: 1px solid var(--newtone-role-divider-secondary);
|
|
199
163
|
border-radius: var(--newtone-radius-md);
|
|
200
164
|
background: var(--newtone-role-surface-primary);
|
|
201
|
-
box-shadow:
|
|
202
|
-
0 var(--newtone-shadow-raised-contact-y) var(--newtone-shadow-raised-contact-blur)
|
|
203
|
-
color-mix(in oklab, var(--newtone-role-text-primary) var(--newtone-shadow-raised-strength-contact), transparent),
|
|
204
|
-
0 var(--newtone-shadow-raised-ambient-y) var(--newtone-shadow-raised-ambient-blur)
|
|
205
|
-
color-mix(in oklab, var(--newtone-role-text-primary) var(--newtone-shadow-raised-strength-ambient), transparent);
|
|
165
|
+
box-shadow: var(--_shadow-high);
|
|
206
166
|
}
|
|
207
167
|
.newtone-thread--card > .newtone-thread-list {
|
|
208
168
|
max-block-size: 60vh;
|