@salesql/sql_components_vue3 3.21.0 → 3.22.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/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 +2566 -2489
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsEmailEditor/DsEmailEditor.types.d.ts +24 -3
- package/dist/ui/DsEmailEditor/DsEmailEditor.vue.d.ts +13 -3
- package/dist/ui/DsPopover/DsPopover.types.d.ts +5 -2
- package/llms-full.txt +118 -11
- 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.22.1)
|
|
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
|
|
|
@@ -355,6 +355,28 @@ also provides the `editor` slot, the same 300px popover swaps the list for that
|
|
|
355
355
|
</DsContactCell>
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
+
The editor does not have to list only the emails of the cell it was opened from. When the back
|
|
359
|
+
classifies each email into a group (work / direct, by domain), pass `groups` instead of `items`: the
|
|
360
|
+
editor then shows ALL the contact's emails under subtitles, so an email added from one column never
|
|
361
|
+
«disappears» into the other one. New rows go at the end, without a subtitle; after saving, the back
|
|
362
|
+
places each one in its group. `save` still emits one flat list of values.
|
|
363
|
+
|
|
364
|
+
```vue
|
|
365
|
+
<template #editor="{ close, cancel }">
|
|
366
|
+
<DsEmailEditor
|
|
367
|
+
:groups="[
|
|
368
|
+
{ title: t('emails.work'), items: workEmails.map((value) => ({ value })) },
|
|
369
|
+
{ title: t('emails.direct'), items: directEmails.map((value) => ({ value })) },
|
|
370
|
+
]"
|
|
371
|
+
:copy="copy"
|
|
372
|
+
:saving="saving"
|
|
373
|
+
@save="persist"
|
|
374
|
+
@cancel="cancel"
|
|
375
|
+
@close="close"
|
|
376
|
+
/>
|
|
377
|
+
</template>
|
|
378
|
+
```
|
|
379
|
+
|
|
358
380
|
- **`cancel()`** (back, Cancel) returns to the list; the popover stays open and pinned.
|
|
359
381
|
- **`close()`** (the editor's close) closes the popover, un-pins it and leaves the mode.
|
|
360
382
|
- A **successful save** is the app's call: set `editing` to `false` (back to the list with the new
|
|
@@ -367,6 +389,24 @@ also provides the `editor` slot, the same 300px popover swaps the list for that
|
|
|
367
389
|
- Without `edit-label` and the `editor` slot nothing changes: the list, hover, pin and outside click
|
|
368
390
|
behave as before.
|
|
369
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
|
+
|
|
370
410
|
#### The page is blocked while editing (backdrop)
|
|
371
411
|
|
|
372
412
|
While editing, the popover is `modal`: a transparent, full-viewport layer sits right under it and
|
|
@@ -684,7 +724,8 @@ colour `$contact-data-badge-a-plus-ink`. Mirrored 1:1 from the contract partial.
|
|
|
684
724
|
## DsEmailEditor
|
|
685
725
|
|
|
686
726
|
The **«Edit emails» form** of a contact: a header (title, optional back and close), one input per
|
|
687
|
-
email with a remove button, «+ Add email», the verification
|
|
727
|
+
email with a remove button (flat, or under subtitles with `groups`), «+ Add email», the verification
|
|
728
|
+
note and Cancel / Save. It is shown
|
|
688
729
|
inside the contact cell popover and in the full-profile contact card, and works on its own in any
|
|
689
730
|
~300-320px panel.
|
|
690
731
|
|
|
@@ -697,11 +738,12 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
697
738
|
|
|
698
739
|
### Props
|
|
699
740
|
|
|
700
|
-
| Prop | Type
|
|
701
|
-
| -------- |
|
|
702
|
-
| `items` | `{ value: string }[]`
|
|
703
|
-
| `
|
|
704
|
-
| `
|
|
741
|
+
| Prop | Type | Default | Description |
|
|
742
|
+
| -------- | ----------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
743
|
+
| `items` | `{ value: string }[]` | `[]` | The current emails, flat (no subtitles). Seeds the rows on mount and is the baseline of «what changed». Ignored when `groups` is passed. |
|
|
744
|
+
| `groups` | `{ title: string; items: { value }[] }[]` | `undefined` | The current emails under subtitles, in the order given (see «Groups»). When passed it **wins over `items`**, even if it is an empty array. |
|
|
745
|
+
| `copy` | `DsEmailEditorCopy` | — | Every visible string (required). The app owns it. |
|
|
746
|
+
| `saving` | `boolean` | `false` | The app's save is in flight: Save spins and the whole form is locked (see «Saving»). |
|
|
705
747
|
|
|
706
748
|
#### `copy` keys
|
|
707
749
|
|
|
@@ -726,7 +768,7 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
726
768
|
| `cancel` | — | Cancel or the header's back button was used (leave without saving). |
|
|
727
769
|
| `close` | — | The header's close button was used. Dismissing the host (popover, panel) is the consumer's job. |
|
|
728
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. |
|
|
729
|
-
| `save` | `(values: string[], changedCount: number)` | Save with no errors. `values`: the final non-empty trimmed emails, in order. `changedCount`: how many are new or have different text than `items` (the app prices «1 verification credit each» with it).
|
|
771
|
+
| `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). |
|
|
730
772
|
|
|
731
773
|
### Behaviour
|
|
732
774
|
|
|
@@ -736,7 +778,8 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
736
778
|
email gets `invalidEmail`; a repeat (trimmed, case-insensitive) gets `duplicateEmail` on the
|
|
737
779
|
later occurrences. An invalid text is never also reported as a duplicate. Empty rows are
|
|
738
780
|
discarded, never an error. With errors, Save emits nothing and focuses the first failing row.
|
|
739
|
-
- «+ Add email» appends an empty row and focuses it.
|
|
781
|
+
- «+ Add email» appends an empty row at the end and focuses it. With `groups` it goes after the last
|
|
782
|
+
group, in an untitled section (no subtitle).
|
|
740
783
|
- **Saving**: with `saving` the Save button shows its own loading state (`DsButton` `loading`: spinner,
|
|
741
784
|
`aria-busy`, not clickable) and the inputs, «Add email», the remove buttons, Cancel, back and close are
|
|
742
785
|
disabled, so there are no edits and no double submit; `save` is not emitted again. The form region
|
|
@@ -750,10 +793,53 @@ job. There are no status marks (pills) inside the editor: the state is not shown
|
|
|
750
793
|
(never the accent) and the text weight does not change on focus.
|
|
751
794
|
- Sections: header (`6px 8px 6px 6px`, hairline below), body (`12px 12px 4px`, rows 8px apart, max
|
|
752
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.
|
|
753
799
|
- Every icon is a `DsIcon`: remove `do_not_disturb_on` (20, `danger`), add `add` (20, accent),
|
|
754
800
|
note `info` (16, `muted`), back `chevron_left` (20, filled, `default`), close `close` (20, `muted`).
|
|
755
801
|
The design's 18px and 14px glyphs move to 20 and 16, the sizes `DsIcon` has.
|
|
756
802
|
|
|
803
|
+
#### Groups
|
|
804
|
+
|
|
805
|
+
Use `groups` when the app's back classifies each email (work / direct, by its domain) and the
|
|
806
|
+
editor must show them ALL, not only the emails of the column it was opened from. Otherwise an
|
|
807
|
+
email added from «Direct email» lands in «Work email» after saving, vanishes from the editor and
|
|
808
|
+
re-adding it hits the duplicate error.
|
|
809
|
+
|
|
810
|
+
```vue
|
|
811
|
+
<DsEmailEditor
|
|
812
|
+
:groups="[
|
|
813
|
+
{ title: t('emails.work'), items: workEmails.map((value) => ({ value })) },
|
|
814
|
+
{ title: t('emails.direct'), items: directEmails.map((value) => ({ value })) },
|
|
815
|
+
]"
|
|
816
|
+
:copy="copy"
|
|
817
|
+
:saving="saving"
|
|
818
|
+
@save="persist"
|
|
819
|
+
@cancel="cancel"
|
|
820
|
+
@close="close"
|
|
821
|
+
/>
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
- Each group with rows renders a section with its `title` as a subtitle above the rows. The subtitle
|
|
825
|
+
uses the same type and ink as the section header of the `DsContactCell` popover list
|
|
826
|
+
(«Work emails (2)»: `micro` 10px, bold, uppercase, 0.6px tracking, `contact-data-ink-muted`),
|
|
827
|
+
without the count and without the ruled band. A group with no emails, or whose rows were all
|
|
828
|
+
removed, renders nothing, not even its subtitle.
|
|
829
|
+
- **New rows go at the end, without a subtitle**, in an untitled section after the groups. The
|
|
830
|
+
editor cannot know where the back will put an email: after saving, the app re-renders with the
|
|
831
|
+
new `groups` and each one shows up in its own.
|
|
832
|
+
- Everything else is shared across groups: validation (format, and duplicates are checked across
|
|
833
|
+
ALL rows of all groups and the new ones, trimmed and case-insensitive), remove, the Save rule,
|
|
834
|
+
`dirty-change`, `saving`, and the focus (the first field of the first group).
|
|
835
|
+
- `save(values, changedCount)` keeps the flat shape: `values` is every row in display order (groups
|
|
836
|
+
in order, then the new rows) and `changedCount` counts the new or edited ones, so an app that
|
|
837
|
+
diffs by value works with `items` or `groups` alike.
|
|
838
|
+
- `groups` wins over `items` when both are passed. Like `items`, it is read when the editor mounts
|
|
839
|
+
(and as the baseline of «what changed»); a later change does not reset what the user is typing.
|
|
840
|
+
- A11y: each titled section is a `role="group"` named by its subtitle (`aria-labelledby`); the
|
|
841
|
+
untitled section has no role.
|
|
842
|
+
|
|
757
843
|
#### Where it deliberately differs from the design export
|
|
758
844
|
|
|
759
845
|
The export's input draws an accent focus border, bold text on focus and a dark rest border. The
|
|
@@ -3101,8 +3187,29 @@ the OPPOSITE side when the preferred one doesn't fit but the other has more room
|
|
|
3101
3187
|
Plus / floating-ui's `flip`, done in the same pure-CSS custom-property mechanism as the
|
|
3102
3188
|
cross-axis clamp, no `floating-ui` dependency added. Always on (no opt-in prop), and
|
|
3103
3189
|
re-evaluated live on open, scroll and resize — see the **Flip near the bottom edge**
|
|
3104
|
-
variant. `over-start` / `over-end`
|
|
3105
|
-
|
|
3190
|
+
variant. `over-start` / `over-end` cover the trigger and hang down from it; they flip too
|
|
3191
|
+
(SALESQL-4183, below), anchored by their bottom edge, and keep their placement name. `DsTooltip`
|
|
3192
|
+
flips the same way (its 4 sides).
|
|
3193
|
+
|
|
3194
|
+
#### Never leaves the viewport (SALESQL-4183)
|
|
3195
|
+
|
|
3196
|
+
A flip only helps while one side has room for the whole panel. A tall panel — a contact cell's
|
|
3197
|
+
email editor near the bottom of a table — fits on neither side and the viewport's edge cut it
|
|
3198
|
+
(with `modal` on, the page behind could not be scrolled to reach the buttons). Three rules now
|
|
3199
|
+
hold, always on, no prop:
|
|
3200
|
+
|
|
3201
|
+
- **Flip, including `over-*`**: it opens on the side with more room. `over-start` / `over-end`
|
|
3202
|
+
hang up from the trigger's bottom edge (`is-flipped` on the panel) when there is no room below.
|
|
3203
|
+
- **Capped to the room**: a panel taller than the room on its side gets
|
|
3204
|
+
`max-height: var(--ds-overlay-max-height)` (set from the measurement, with the `boundary`
|
|
3205
|
+
applied). It then lays out as a flex column (`is-capped`): a child with `min-height: 0` shrinks
|
|
3206
|
+
and scrolls on its own (`DsEmailEditor`'s rows; its header and footer stay in view), anything
|
|
3207
|
+
else makes the panel scroll. Fits = no cap, nothing changes.
|
|
3208
|
+
- **Measured again when its content changes size** — the list swapping for the editor, rows
|
|
3209
|
+
added — through a `ResizeObserver`, one frame later, plus the open / scroll / resize it
|
|
3210
|
+
already used. Closing resets it all.
|
|
3211
|
+
|
|
3212
|
+
See the **Tall panel near the bottom** variant.
|
|
3106
3213
|
|
|
3107
3214
|
### Teleported
|
|
3108
3215
|
|