@alis-build/design-system 0.34.0 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/alisx.css CHANGED
@@ -900,6 +900,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
900
900
  .app-composer__meter>i{display:block;flex:none;width:3px;height:4px;border-radius:2px;background:currentColor}
901
901
  .app-composer__rec{display:inline-flex;align-items:center;gap:var(--space-8);padding-inline:var(--space-8);color:var(--on-surface);white-space:nowrap}
902
902
  /* A live microphone: the dot pulses in error beside "Recording" (rules/colour.md § The two reds); a call is not a recording */
903
+ .app-field__box--voice{flex-direction:column;align-items:stretch;gap:0;padding-top:var(--space-4)}
904
+ .app-field__voice{display:flex;align-items:center;gap:var(--space-4);margin:0 calc(var(--space-8) * -1) var(--space-4)}
905
+ .app-field__voice>:last-child{margin-left:auto}
903
906
  .app-field__rec{display:inline-flex;align-items:center;gap:var(--space-8);color:var(--on-surface)}
904
907
  .app-composer__rec::before,.app-field__rec::before{content:"";width:8px;height:8px;border-radius:var(--radius-pill);background:var(--error)}
905
908
  @media (prefers-reduced-motion:no-preference){.app-composer__rec::before,.app-field__rec::before{animation:app-dot 1.2s var(--motion-effects) infinite both}}
package/classes.json CHANGED
@@ -140,6 +140,7 @@
140
140
  "app-field",
141
141
  "app-field__box",
142
142
  "app-field__box--select",
143
+ "app-field__box--voice",
143
144
  "app-field__input",
144
145
  "app-field__label",
145
146
  "app-field__rec",
@@ -147,6 +148,7 @@
147
148
  "app-field__select",
148
149
  "app-field__support",
149
150
  "app-field__values",
151
+ "app-field__voice",
150
152
  "app-fieldset",
151
153
  "app-fieldset__legend",
152
154
  "app-fieldset__support",
@@ -5,7 +5,7 @@ Where you write to Alis, an agent or a person. One floating surface with three b
5
5
  ## Use / don't use
6
6
 
7
7
  - **Every conversation**: Ideate, an interview, an agent session, a specialist thread. One composer per conversation, at the thread's measure (`measure-prose`, 710px), docked to the bottom of the thread or centred on an empty home.
8
- - **Not a form.** Something you fill in and submit once (feedback, a ticket, a contribution, a new session's brief) is an [AppTextField](AppTextField.md) with a labelled filled button ([page.md](../rules/page.md) § Forms). Its voice is the field's dictation, whose Stop never submits: the composer's trailing button sends, so inside a form, stopping a recording would send the form.
8
+ - **Not a form.** Something you fill in and submit once (feedback, a ticket, a contribution, a new session's brief) is an [AppTextField](AppTextField.md) with a labelled filled button ([page.md](../rules/page.md) § Forms). Its voice is the field's dictation, whose ✓ keeps the text and never submits: the composer's trailing button sends, so inside a form, stopping a recording would send the form.
9
9
  - The surface is `surface-container-high` (white in light, a step lighter than a card in dark) at `elevation-2` with `radius-xl` (28): concentric with the 40px trailing button set 8 in. It floats; locked, it drops to the ground and the shadow goes.
10
10
 
11
11
  ## Anatomy
@@ -9,7 +9,7 @@ A labelled text input: label above, an outlined box, one supporting or error lin
9
9
  - **An error** replaces the supporting line, in `error` with the `error` icon (outlined: FILL 1 is for selection), and turns the border `error`. Say what to do, as a sentence with a full stop: "Enter a full email address.", not "Invalid".
10
10
  - A `<textarea>` for longer answers. A leading icon only for a conventional glyph (mail, search, link).
11
11
  - **Action**: one text [AppButton](AppButton.md) beside the box (Add, Copy), for a field that collects several values or acts on its own value. Collected values are input [AppChip](AppChip.md)s between the box and the supporting line. With none yet, show nothing; the supporting line says the format ("One per line, as NAME=value.").
12
- - **Voice in a field is dictation.** A plain `mic` icon button "Dictate" beside the box, where an action sits. While it listens it is `stop` "Stop dictating", the words land in the box as you speak, and the supporting line says **Recording** beside the red dot (a live microphone's privacy signal, [colour.md](../rules/colour.md) § The two reds). Stopping keeps the words to edit. **It never submits**: only the form's own labelled button does. A form never takes a composer, a voice note or a Send arrow ([AppComposer](AppComposer.md)).
12
+ - **A field that takes dictation** keeps its outline and puts a plain `mic` icon button, "Dictate", in the bottom trailing corner inside the box. While it records, the composer's recording controls take that bottom row: `delete` "Discard recording" leading, the red dot beside **Recording** (a live microphone's privacy signal, [colour.md](../rules/colour.md) § The two reds), and a plain `check` "Done, keep the text" trailing. The words join the text, where you can edit them. **It never submits**: only the form's labelled button does. The filled circle is the composer's alone, and a form never takes a composer, a voice note or Send ([AppComposer](AppComposer.md)).
13
13
  - **A choice from a list** is an [AppSelect](AppSelect.md), or an [AppCombobox](AppCombobox.md) when the list is long; an on/off setting is an [AppSwitch](AppSwitch.md) ([page.md](../rules/page.md) § Which control).
14
14
  - **A set of choices** (tiles, checkboxes) is labelled with a field set: a legend in label type, an optional supporting line.
15
15
  - **A form** is one column at the prose measure, fields 24px apart (`.app-form`), with its one filled action last. [page.md](../rules/page.md) § Forms says where errors go.
@@ -58,14 +58,21 @@ A labelled text input: label above, an outlined box, one supporting or error lin
58
58
  <p id="f-vars-s" class="app-field__support text-supporting">Add one at a time, as NAME=value.</p>
59
59
  </div>
60
60
 
61
- <!-- Dictation, while it listens: stop beside the box; Recording on the supporting line -->
61
+ <!-- Dictation: the mic in the box's bottom trailing corner -->
62
62
  <div class="app-field">
63
63
  <label for="f-what" class="app-field__label text-label">What happened?</label>
64
- <div class="app-field__row">
65
- <div class="app-field__box"><textarea id="f-what" class="app-field__input" rows="4" aria-describedby="f-what-s"></textarea></div>
66
- <button type="button" class="app-icon-btn app-state app-target" aria-label="Stop dictating" title="Stop dictating"><span class="app-icon app-icon--filled" aria-hidden="true">stop</span></button>
64
+ <div class="app-field__box app-field__box--voice">
65
+ <textarea id="f-what" class="app-field__input" rows="4"></textarea>
66
+ <div class="app-field__voice">
67
+ <button type="button" class="app-icon-btn app-icon-btn--small app-state app-target" aria-label="Dictate" title="Dictate"><span class="app-icon" aria-hidden="true">mic</span></button>
68
+ </div>
67
69
  </div>
68
- <p id="f-what-s" class="app-field__support text-supporting"><span class="app-field__rec">Recording</span></p>
70
+ </div>
71
+ <!-- While it records: Discard, Recording, then ✓ -->
72
+ <div class="app-field__voice">
73
+ <button type="button" class="app-icon-btn app-icon-btn--small app-state app-target" aria-label="Discard recording" title="Discard recording"><span class="app-icon" aria-hidden="true">delete</span></button>
74
+ <span class="app-field__rec text-label">Recording</span>
75
+ <button type="button" class="app-icon-btn app-icon-btn--small app-state app-target" aria-label="Done, keep the text" title="Done, keep the text"><span class="app-icon" aria-hidden="true">check</span></button>
69
76
  </div>
70
77
 
71
78
  <!-- Field set: labels a set of choices -->
@@ -87,9 +94,9 @@ Disabled: `disabled` on the input and `is-disabled` on `.app-field`.
87
94
 
88
95
  - Give every input an `id`, point the label's `for` at it, and the support line's `id` (`<id>-s`) at `aria-describedby`.
89
96
  - **Error**: on submit, add `is-error` to `.app-field`, `aria-invalid="true"` to the input, put the error icon and message in the support line (replacing the supporting text), then focus the first invalid field. Remove all of it once fixed.
90
- - **Dictation**: the mic starts it and swaps to `stop` "Stop dictating"; the words go into the box at the caret, the ones still settling in `on-surface-variant`. Stop, Escape or leaving the field ends it and keeps the words; the supporting text comes back. Enter while it listens does nothing. Mic blocked: the button shows `mic_off` and pressing it says on the supporting line how to allow it.
97
+ - **Dictation**: the mic starts recording and the bottom row becomes the recording controls. ✓ ends it and adds the words to the end of the text, a space between; Discard ends it and drops them, and so does leaving the screen. Keep the form's button disabled while a field records, so a half-captured answer is never sent. Mic blocked, or nothing came back: say so on the supporting line, with what to do ("Allow microphone access in your browser, then try Dictate again.").
91
98
  - **Action field**: Enter in the input runs the action (prevent the form submit); validate the value, add it as an input chip, clear the input.
92
99
 
93
100
  ## Classes
94
101
 
95
- `.app-field`, `.is-error`, `.is-disabled`, `.app-field__label`, `.app-field__box`, `.app-field__input`, `.app-field__row`, `.app-field__values`, `.app-field__support`, `.app-field__rec`; `.app-fieldset`, `.app-fieldset__legend`, `.app-fieldset__support`; `.app-form`.
102
+ `.app-field`, `.is-error`, `.is-disabled`, `.app-field__label`, `.app-field__box`, `.app-field__input`, `.app-field__row`, `.app-field__values`, `.app-field__support`, `.app-field__box--voice`, `.app-field__voice`, `.app-field__rec`; `.app-fieldset`, `.app-fieldset__legend`, `.app-fieldset__support`; `.app-form`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",