@salesql/sql_components_vue3 3.22.0 → 3.23.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/composables/useViewportClamp.d.ts +11 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +2571 -2525
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsEmailEditor/DsEmailEditor.types.d.ts +22 -2
- package/dist/ui/DsPopover/DsPopover.types.d.ts +5 -2
- package/llms-full.txt +88 -12
- package/package.json +1 -1
package/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @salesql/sql_components_vue3 — SalesQL Design System (v3.
|
|
1
|
+
# @salesql/sql_components_vue3 — SalesQL Design System (v3.23.0)
|
|
2
2
|
|
|
3
3
|
> Librería de componentes Vue 3 (SalesQL) Presentational-only Vue 3 components (props in, events out; the consuming app owns state, i18n and data). This file is auto-generated from the component stories for LLM/agent consumption — do not edit by hand.
|
|
4
4
|
|
|
@@ -389,6 +389,24 @@ places each one in its group. `save` still emits one flat list of values.
|
|
|
389
389
|
- Without `edit-label` and the `editor` slot nothing changes: the list, hover, pin and outside click
|
|
390
390
|
behave as before.
|
|
391
391
|
|
|
392
|
+
#### Never leaves the viewport (SALESQL-4183)
|
|
393
|
+
|
|
394
|
+
A cell near the bottom of the window used to open its popover downwards; in edit mode the editor
|
|
395
|
+
(tall, with `groups`) went past the bottom edge, Save / Cancel were out of sight and — since the
|
|
396
|
+
page is blocked while editing — the user could not scroll to reach them. Now the popover (`DsPopover`)
|
|
397
|
+
never overflows the viewport, in the list and in the editor alike:
|
|
398
|
+
|
|
399
|
+
- It **flips up** when there is no room below and more above — `over-start` (this cell's default)
|
|
400
|
+
included: it then hangs up from the cell's bottom edge.
|
|
401
|
+
- It is **capped to the room** it has on its side, re-measured when the editor replaces the list (or
|
|
402
|
+
rows are added or removed). Capped, the `DsEmailEditor` keeps its header (back, title, ✕) and footer
|
|
403
|
+
(Cancel / Save) in view and **only the rows scroll**; any other editor in the slot scrolls as a whole,
|
|
404
|
+
or shrinks if its root has `min-height: 0` and a flex column of its own.
|
|
405
|
+
- **There is always an exit**, capped or not, with unsaved changes or not: the header ✕ and ESC close
|
|
406
|
+
the popover, Cancel and Back return to the list. The `boundary` keeps working along with all this.
|
|
407
|
+
|
|
408
|
+
No new props. See the **Edit mode near the bottom edge** variants.
|
|
409
|
+
|
|
392
410
|
#### The page is blocked while editing (backdrop)
|
|
393
411
|
|
|
394
412
|
While editing, the popover is `modal`: a transparent, full-viewport layer sits right under it and
|
|
@@ -745,12 +763,12 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
745
763
|
|
|
746
764
|
### Events
|
|
747
765
|
|
|
748
|
-
| Event | Payload
|
|
749
|
-
| -------------- |
|
|
750
|
-
| `cancel` | —
|
|
751
|
-
| `close` | —
|
|
752
|
-
| `dirty-change` | `boolean`
|
|
753
|
-
| `save` | `(values: string[], changedCount: number)` | Save with no errors. `values`: the final non-empty trimmed emails, flat, in display order (with `groups`: every group in order, then the new rows). `changedCount`: how many are new or have different text than `items` (the app prices «1 verification credit each» with it).
|
|
766
|
+
| Event | Payload | When |
|
|
767
|
+
| -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
768
|
+
| `cancel` | — | Cancel or the header's back button was used (leave without saving). |
|
|
769
|
+
| `close` | — | The header's close button was used. Dismissing the host (popover, panel) is the consumer's job. |
|
|
770
|
+
| `dirty-change` | `boolean` | What the form shows started (`true`) or stopped (`false`) differing from `items`: the same rule that enables Save (blank rows and surrounding spaces do not count; typing the original back is clean). Emitted on changes only: a fresh editor is clean and says nothing. In a `DsContactCell` wire it to the slot's `setDirty` (`@dirty-change="setDirty"`) so a click on the edit-mode backdrop does not drop unsaved edits. |
|
|
771
|
+
| `save` | `(values: string[], changedCount: number, rows: DsEmailEditorSavedRow[])` | Save with no errors. `values`: the final non-empty trimmed emails, flat, in display order (with `groups`: every group in order, then the new rows). `changedCount`: how many are new or have different text than `items` (the app prices «1 verification credit each» with it). `rows`: where each of those came from (see «Row identity»). |
|
|
754
772
|
|
|
755
773
|
### Behaviour
|
|
756
774
|
|
|
@@ -775,6 +793,9 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
775
793
|
(never the accent) and the text weight does not change on focus.
|
|
776
794
|
- Sections: header (`6px 8px 6px 6px`, hairline below), body (`12px 12px 4px`, rows 8px apart, max
|
|
777
795
|
height 248px with the library scrollbar), note, footer (`10px 12px`, hairline above, 32px buttons).
|
|
796
|
+
- **Inside a capped container** (SALESQL-4183): the root is a flex column with `min-height: 0`; the
|
|
797
|
+
header, the note and the footer never shrink and the body takes the cut. In a `DsContactCell`
|
|
798
|
+
popover capped to the viewport, only the rows scroll: ✕, Cancel and Save stay in view.
|
|
778
799
|
- Every icon is a `DsIcon`: remove `do_not_disturb_on` (20, `danger`), add `add` (20, accent),
|
|
779
800
|
note `info` (16, `muted`), back `chevron_left` (20, filled, `default`), close `close` (20, `muted`).
|
|
780
801
|
The design's 18px and 14px glyphs move to 20 and 16, the sizes `DsIcon` has.
|
|
@@ -811,14 +832,48 @@ re-adding it hits the duplicate error.
|
|
|
811
832
|
- Everything else is shared across groups: validation (format, and duplicates are checked across
|
|
812
833
|
ALL rows of all groups and the new ones, trimmed and case-insensitive), remove, the Save rule,
|
|
813
834
|
`dirty-change`, `saving`, and the focus (the first field of the first group).
|
|
814
|
-
- `save(values, changedCount)
|
|
815
|
-
|
|
816
|
-
|
|
835
|
+
- `save(values, changedCount, rows)`: `values` is every row in display order (groups in order, then
|
|
836
|
+
the new rows) and `changedCount` counts the new or edited ones, so an app that diffs by value works
|
|
837
|
+
with `items` or `groups` alike. An app that maps edits to ids reads `rows` (see «Row identity»).
|
|
817
838
|
- `groups` wins over `items` when both are passed. Like `items`, it is read when the editor mounts
|
|
818
839
|
(and as the baseline of «what changed»); a later change does not reset what the user is typing.
|
|
819
840
|
- A11y: each titled section is a `role="group"` named by its subtitle (`aria-labelledby`); the
|
|
820
841
|
untitled section has no role.
|
|
821
842
|
|
|
843
|
+
#### Row identity (`rows`, the third argument of `save`)
|
|
844
|
+
|
|
845
|
+
`values` is a flat list, so an app cannot tell WHICH original email an edited value came from:
|
|
846
|
+
pairing «removed + added» by position can turn «removed `w1`, edited `d1` into `d2`» into «update
|
|
847
|
+
`w1` to `d2`». The editor knows each row's identity, so it reports it:
|
|
848
|
+
|
|
849
|
+
```ts
|
|
850
|
+
interface DsEmailEditorSavedRow {
|
|
851
|
+
value: string; // what the row holds now, trimmed (case kept, like `values`)
|
|
852
|
+
original: string | null; // the trimmed value it was seeded with; null = added with «Add email»
|
|
853
|
+
group: number | null; // index in `groups` it was seeded from; null = new row, or flat `items`
|
|
854
|
+
}
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
- One entry per row still in the form, in display order, aligned 1:1 with `values`
|
|
858
|
+
(`rows.map((row) => row.value)` equals `values`: blank rows are in neither).
|
|
859
|
+
- **Removed rows are absent** (and so are rows the user emptied): the app derives deletions as the
|
|
860
|
+
originals that appear in no entry.
|
|
861
|
+
- `value === original` is an untouched row; `value !== original` is an edit of THAT original, however
|
|
862
|
+
many rows were removed, added or re-ordered around it. A new row keeps `original: null` however
|
|
863
|
+
often it is edited.
|
|
864
|
+
- `group` is the index in the `groups` prop, not the position on screen: a group emptied by removing
|
|
865
|
+
its rows does not shift the others.
|
|
866
|
+
- Additive: `values` and `changedCount` are unchanged, an existing `@save="(values, count) => …"`
|
|
867
|
+
keeps working. The array is built on every save, so the app may mutate it freely.
|
|
868
|
+
|
|
869
|
+
Edit a Direct row while removing a Work row (`groups`: Work `[w1]`, Direct `[d1]`):
|
|
870
|
+
|
|
871
|
+
```ts
|
|
872
|
+
// save(values, changedCount, rows)
|
|
873
|
+
(['d2@gmail.com'], 1, [{ value: 'd2@gmail.com', original: 'd1@gmail.com', group: 1 }]);
|
|
874
|
+
// no entry has original 'w1@acme.com' -> the app deletes w1 and updates d1 to d2
|
|
875
|
+
```
|
|
876
|
+
|
|
822
877
|
#### Where it deliberately differs from the design export
|
|
823
878
|
|
|
824
879
|
The export's input draws an accent focus border, bold text on focus and a dark rest border. The
|
|
@@ -3166,8 +3221,29 @@ the OPPOSITE side when the preferred one doesn't fit but the other has more room
|
|
|
3166
3221
|
Plus / floating-ui's `flip`, done in the same pure-CSS custom-property mechanism as the
|
|
3167
3222
|
cross-axis clamp, no `floating-ui` dependency added. Always on (no opt-in prop), and
|
|
3168
3223
|
re-evaluated live on open, scroll and resize — see the **Flip near the bottom edge**
|
|
3169
|
-
variant. `over-start` / `over-end`
|
|
3170
|
-
|
|
3224
|
+
variant. `over-start` / `over-end` cover the trigger and hang down from it; they flip too
|
|
3225
|
+
(SALESQL-4183, below), anchored by their bottom edge, and keep their placement name. `DsTooltip`
|
|
3226
|
+
flips the same way (its 4 sides).
|
|
3227
|
+
|
|
3228
|
+
#### Never leaves the viewport (SALESQL-4183)
|
|
3229
|
+
|
|
3230
|
+
A flip only helps while one side has room for the whole panel. A tall panel — a contact cell's
|
|
3231
|
+
email editor near the bottom of a table — fits on neither side and the viewport's edge cut it
|
|
3232
|
+
(with `modal` on, the page behind could not be scrolled to reach the buttons). Three rules now
|
|
3233
|
+
hold, always on, no prop:
|
|
3234
|
+
|
|
3235
|
+
- **Flip, including `over-*`**: it opens on the side with more room. `over-start` / `over-end`
|
|
3236
|
+
hang up from the trigger's bottom edge (`is-flipped` on the panel) when there is no room below.
|
|
3237
|
+
- **Capped to the room**: a panel taller than the room on its side gets
|
|
3238
|
+
`max-height: var(--ds-overlay-max-height)` (set from the measurement, with the `boundary`
|
|
3239
|
+
applied). It then lays out as a flex column (`is-capped`): a child with `min-height: 0` shrinks
|
|
3240
|
+
and scrolls on its own (`DsEmailEditor`'s rows; its header and footer stay in view), anything
|
|
3241
|
+
else makes the panel scroll. Fits = no cap, nothing changes.
|
|
3242
|
+
- **Measured again when its content changes size** — the list swapping for the editor, rows
|
|
3243
|
+
added — through a `ResizeObserver`, one frame later, plus the open / scroll / resize it
|
|
3244
|
+
already used. Closing resets it all.
|
|
3245
|
+
|
|
3246
|
+
See the **Tall panel near the bottom** variant.
|
|
3171
3247
|
|
|
3172
3248
|
### Teleported
|
|
3173
3249
|
|