@salesql/sql_components_vue3 3.19.0 → 3.22.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.
@@ -1,6 +1,15 @@
1
1
  export interface DsEmailEditorItem {
2
2
  value: string;
3
3
  }
4
+ /**
5
+ * A titled run of rows: the subtitle («Work emails») and the emails listed under it. Meant for
6
+ * apps whose back classifies each email into a group: the editor shows all of them at once.
7
+ */
8
+ export interface DsEmailEditorGroup {
9
+ /** The subtitle above the rows. The app owns it (and its i18n). */
10
+ title: string;
11
+ items: DsEmailEditorItem[];
12
+ }
4
13
  /** Every string the editor shows or announces. The app owns it (and its i18n). */
5
14
  export interface DsEmailEditorCopy {
6
15
  /** Heading of the form ("Edit emails"). */
@@ -27,10 +36,22 @@ export interface DsEmailEditorCopy {
27
36
  }
28
37
  export interface DsEmailEditorProps {
29
38
  /**
30
- * The current emails. Read when the editor mounts and as the baseline of «what changed»:
31
- * a later change of the array does not reset what the user is typing.
39
+ * The current emails, flat: one list of rows, no subtitles. Read when the editor mounts and as
40
+ * the baseline of «what changed»: a later change of the array does not reset what the user is
41
+ * typing. Ignored when `groups` is passed.
32
42
  */
33
- items: DsEmailEditorItem[];
43
+ items?: DsEmailEditorItem[];
44
+ /**
45
+ * The current emails under subtitles, in the order given. When passed, it wins over `items`
46
+ * (even an empty array: `items` is then never read). Each group that has rows renders a
47
+ * `role="group"` section named by its `title`; a group without rows (or whose rows were all
48
+ * removed) renders nothing, not even its subtitle. Rows added with «Add email» go at the end,
49
+ * in an untitled section after the groups: the app's back places them in their group when it
50
+ * saves. `save` still emits ONE flat list in display order (every group in order, then the new
51
+ * rows), so an app that diffs by value works with groups or without. Seeded on mount, like
52
+ * `items`.
53
+ */
54
+ groups?: DsEmailEditorGroup[];
34
55
  copy: DsEmailEditorCopy;
35
56
  /**
36
57
  * The consumer's save is in flight. Save shows its spinner and ignores clicks, and the inputs,
@@ -1,9 +1,13 @@
1
1
  import { type PropType } from 'vue';
2
- import type { DsEmailEditorCopy, DsEmailEditorItem } from './DsEmailEditor.types';
2
+ import type { DsEmailEditorCopy, DsEmailEditorGroup, DsEmailEditorItem } from './DsEmailEditor.types';
3
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  items: {
5
5
  type: PropType<DsEmailEditorItem[]>;
6
- required: true;
6
+ default: () => never[];
7
+ };
8
+ groups: {
9
+ type: PropType<DsEmailEditorGroup[]>;
10
+ default: undefined;
7
11
  };
8
12
  copy: {
9
13
  type: PropType<DsEmailEditorCopy>;
@@ -15,12 +19,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
15
19
  };
16
20
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
21
  close: (...args: any[]) => void;
22
+ "dirty-change": (...args: any[]) => void;
18
23
  cancel: (...args: any[]) => void;
19
24
  save: (...args: any[]) => void;
20
25
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
26
  items: {
22
27
  type: PropType<DsEmailEditorItem[]>;
23
- required: true;
28
+ default: () => never[];
29
+ };
30
+ groups: {
31
+ type: PropType<DsEmailEditorGroup[]>;
32
+ default: undefined;
24
33
  };
25
34
  copy: {
26
35
  type: PropType<DsEmailEditorCopy>;
@@ -32,9 +41,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
32
41
  };
33
42
  }>> & Readonly<{
34
43
  onClose?: ((...args: any[]) => any) | undefined;
44
+ "onDirty-change"?: ((...args: any[]) => any) | undefined;
35
45
  onCancel?: ((...args: any[]) => any) | undefined;
36
46
  onSave?: ((...args: any[]) => any) | undefined;
37
47
  }>, {
48
+ items: DsEmailEditorItem[];
49
+ groups: DsEmailEditorGroup[];
38
50
  saving: boolean;
39
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
40
52
  export default _default;
@@ -5,9 +5,12 @@ export interface DsModalProps {
5
5
  width?: string;
6
6
  /** Explicit dialog height (any CSS length). Unset = content height. */
7
7
  height?: string;
8
- /** Top offset of the dialog inside the fixed backdrop (portal mode). */
8
+ /**
9
+ * Opt-in top offset (any CSS length, portal mode). Unset = vertically centered; set = the
10
+ * dialog is anchored at that offset (for long or variable-height content).
11
+ */
9
12
  top?: string;
10
- /** Center the body text. */
13
+ /** Center-align the body text. It does not affect the vertical placement. */
11
14
  center?: boolean;
12
15
  /** false = render in-flow (no backdrop / portal / scroll-lock) for specimen cards. */
13
16
  fixed?: boolean;
@@ -77,11 +77,22 @@ export interface DsPopoverProps {
77
77
  * Root and trigger fill their container instead of hugging the trigger's content: the
78
78
  * whole surface opens the panel (a table cell painted as clickable end to end). SALESQL-4056.
79
79
  */
80
- block?: boolean; /**
80
+ block?: boolean;
81
+ /**
81
82
  * Keeps the panel inside this box as well as the viewport — an element, or a getter for its
82
83
  * rect. The panel's edges stop at the boundary's (flush, no margin) and it is capped to the
83
84
  * width left, so it never covers what is beyond it: the prospector table's sticky «Actions»
84
85
  * column. `null` (default) = viewport only. Additive (SALESQL-4428).
85
86
  */
86
- boundary?: DsPopoverBoundary;
87
+ boundary?: DsPopoverBoundary; /**
88
+ * Behaves like a modal while open: a transparent full-viewport layer sits right under the
89
+ * panel and above the page, so nothing behind it can be clicked or hovered. It does not dim
90
+ * and the panel does not move. A click on it emits `backdrop-click`; the popover does not
91
+ * close for that on its own (the consumer decides: close, refocus…) except through
92
+ * `closeOnOutside`, which treats a press on the layer as any outside press. Teleported, the
93
+ * layer lives in the same fixed anchor as the panel; inline, it sits in the root next to the
94
+ * panel, so it only covers what the panel's own stacking context covers — pair it with
95
+ * `teleported` inside tables and scrollers. Off (default) = no layer. Additive (SALESQL-4183).
96
+ */
97
+ modal?: boolean;
87
98
  }
@@ -54,8 +54,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
54
54
  type: PropType<DsPopoverBoundary>;
55
55
  default: null;
56
56
  };
57
+ modal: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
57
61
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
62
  "update:open": (...args: any[]) => void;
63
+ "backdrop-click": (...args: any[]) => void;
59
64
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
60
65
  open: BooleanConstructor;
61
66
  placement: {
@@ -102,8 +107,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
102
107
  type: PropType<DsPopoverBoundary>;
103
108
  default: null;
104
109
  };
110
+ modal: {
111
+ type: BooleanConstructor;
112
+ default: boolean;
113
+ };
105
114
  }>> & Readonly<{
106
115
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
116
+ "onBackdrop-click"?: ((...args: any[]) => any) | undefined;
107
117
  }>, {
108
118
  width: string;
109
119
  flush: boolean;
@@ -117,6 +127,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
117
127
  closeOnOutside: boolean;
118
128
  triggerOnClick: boolean;
119
129
  boundary: DsPopoverBoundary;
130
+ modal: boolean;
120
131
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
121
132
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
122
133
  export default _default;
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v3.19.0)
1
+ # @salesql/sql_components_vue3 — SalesQL Design System (v3.22.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
 
@@ -75,7 +75,7 @@ Components size their own glyphs (their scoped rules outrank the 20px default),
75
75
  - **DsTable** (Data) — Data-dense table with two composition modes: **declarative** (`columns` + `rows`, with
76
76
  - **DsVerificationIcon** (Data) — Status glyph for a contact data point (email/phone): verified, unverified, or newly
77
77
  - **DsAlert** (Feedback) — Inline banner for status/confirmation messages (success, info, warning, error). It
78
- - **DsModal** (Feedback) — Centered dialog with an optional header (title + close button) and footer action row.
78
+ - **DsModal** (Feedback) — Dialog with an optional header (title + close button) and footer action row, vertically
79
79
  - **DsNotification** (Feedback) — Fixed-position toast card for transient feedback (saved, updated, failed…). It renders
80
80
  - **DsTooltip** (Feedback) — Dark bubble that describes a wrapped trigger on hover or keyboard focus, with 4-way
81
81
  - **DsCheckbox** (Forms) — Checked / unchecked / indeterminate selection control. **Presentational only**.
@@ -243,10 +243,11 @@ Off-scale values (10.5px, 13.5px, 1.45) follow the export (Diego, 2026-09-23).
243
243
  ## DsAddToSequence
244
244
 
245
245
  The canonical "Add to sequence" control: a trigger and a panel with the **SEND TO** choice
246
- (Work / Direct email as stacked radio cards), a searchable multi-select of campaigns and an
247
- **Add** confirm that stays disabled until something is selected. Measured from the design
248
- export's `SequenceButton` / `sequenceMenu`. One affordance for the full profile and the
249
- bulk bars — the trigger switches look with `variant` and `size`.
246
+ (Work / Direct email as stacked radio cards), a searchable list of campaigns (multi-select,
247
+ or one campaign per Add with `selection="single"`) and an **Add** confirm that stays disabled
248
+ until something is selected. Measured from the design export's `SequenceButton` /
249
+ `sequenceMenu`. One affordance for the full profile and the bulk bars — the trigger
250
+ switches look with `variant` and `size`.
250
251
 
251
252
  The library knows nothing about campaigns or sending: it renders the list you pass and
252
253
  emits the intent.
@@ -262,8 +263,12 @@ emits the intent.
262
263
  | `defaultChannel` | `'work' \| 'direct'` | `'work'` | Initially selected channel. |
263
264
  | `campaignsLabel` | `string` | `''` | Caption above the list ("Recent campaigns"). Empty = none. |
264
265
  | `campaigns` | `DsPickerOption[]` | — | The campaigns to offer (required). |
266
+ | `selection` | `'multiple' \| 'single'` | `'multiple'` | `multiple`: checkboxes. `single`: radios, one campaign per Add. |
267
+ | `loading` | `boolean` | `false` | The app is fetching campaigns: a spinner replaces the list and the empty state. The search stays usable. |
268
+ | `loadingLabel` | `string` | `''` | Accessible name of the spinner. Empty = DsSpinner's own ("Loading"). |
265
269
  | `searchPlaceholder` | `string` | `''` | |
266
- | `emptyLabel` | `string` | `''` | Shown when the search matches nothing. |
270
+ | `emptyLabel` | `string` | `''` | Shown when the list is empty: no campaigns, or a search with no matches. |
271
+ | `createLabel` | `string` | `''` | The empty state's CTA ("Create campaign"): a tertiary `DsButton` under `emptyLabel` that emits `create`. Empty = no CTA. |
267
272
  | `addLabel` | `string` | — | The confirm (required). |
268
273
  | `variant` | `'secondary' \| 'primary'` | `'secondary'` | `DsButton outline` (white, hairline ring) or `DsButton primary` (solid accent). |
269
274
  | `size` | `'medium' \| 'large'` | `'medium'` | 32px / 36px trigger. |
@@ -273,17 +278,22 @@ emits the intent.
273
278
 
274
279
  ### Events
275
280
 
276
- | Event | Payload | When |
277
- | ------------- | -------------------------------------------------------------- | --------------------------------------------- |
278
- | `add` | `{ channel: 'work' \| 'direct', campaigns: DsPickerOption[] }` | Add clicked. Panel closes, selection resets. |
279
- | `search` | `string` | The search text changed (filtering is local). |
280
- | `update:open` | `boolean` | The panel opened or closed. |
281
+ | Event | Payload | When |
282
+ | ------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
283
+ | `add` | `{ channel: 'work' \| 'direct', campaigns: DsPickerOption[] }` | Add clicked. Panel closes, selection resets. `campaigns` keeps the order they were chosen in (one item in `single`). |
284
+ | `search` | `string` | Every keystroke, no debounce. The list also filters locally; an app that searches on the server debounces this and swaps `campaigns` (with `loading` while it waits). A chosen campaign survives the swap. |
285
+ | `create` | `string` | The empty state's CTA was clicked. Payload: the search text, trimmed. Panel closes; the app owns creation (it navigates to Campaigns). |
286
+ | `update:open` | `boolean` | The panel opened or closed. |
281
287
 
282
288
  ### Accessibility
283
289
 
284
290
  - The trigger is a `DsButton` (`outline` / `primary`, `medium` / `large`) with
285
291
  `aria-haspopup="dialog"` / `aria-expanded`; the channels are a native radio group
286
- (`DsRadio`, one `name` per instance); campaigns are `DsCheckbox` rows.
292
+ (`DsRadio`, one `name` per instance); campaigns are `DsCheckbox` rows in a `group`, or
293
+ `DsRadio` rows in their own `radiogroup` with `selection="single"`.
294
+ - While `loading`, the list is `aria-busy` and holds a `DsSpinner` (`role="status"`).
295
+ - With nothing to list, the group / radiogroup is not rendered (an empty radiogroup is
296
+ invalid ARIA): the empty label and the CTA sit after the caption instead.
287
297
  - `Add` is a real disabled `DsButton` until a campaign is selected.
288
298
 
289
299
  ### Design parity (export `SequenceButton`)
@@ -298,6 +308,10 @@ emits the intent.
298
308
  label vs 13.5px/700; trigger height 40px → `large` (36px) / default `medium` (32px); Add is
299
309
  `DsButton` medium (32) vs 34; section captions 10.5px → `micro` (10px) in `slate-soft`
300
310
  (`#5e666f`) vs the export's `#5c6670`; panel radius 6 vs 8.
311
+ - **Not in the export:** `selection="single"` reuses the campaign row with a `DsRadio`
312
+ (the `DsSavedButton` single-pick language), `loading` is the centred small `DsSpinner`
313
+ `DsSelect` shows while it fetches, and the empty state's CTA is the tertiary `add` button
314
+ of `DsSavedButton`'s create footer, under the empty label (Diego, 26/10).
301
315
 
302
316
  ---
303
317
 
@@ -341,6 +355,28 @@ also provides the `editor` slot, the same 300px popover swaps the list for that
341
355
  </DsContactCell>
342
356
  ```
343
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
+
344
380
  - **`cancel()`** (back, Cancel) returns to the list; the popover stays open and pinned.
345
381
  - **`close()`** (the editor's close) closes the popover, un-pins it and leaves the mode.
346
382
  - A **successful save** is the app's call: set `editing` to `false` (back to the list with the new
@@ -353,6 +389,33 @@ also provides the `editor` slot, the same 300px popover swaps the list for that
353
389
  - Without `edit-label` and the `editor` slot nothing changes: the list, hover, pin and outside click
354
390
  behave as before.
355
391
 
392
+ #### The page is blocked while editing (backdrop)
393
+
394
+ While editing, the popover is `modal`: a transparent, full-viewport layer sits right under it and
395
+ above the page, so nothing behind can be clicked or hovered (no full profile, no reveal, no other
396
+ cell's popover). It does not dim and the popover does not move; it exists only while editing and
397
+ is gone when the mode is left or the cell unmounts. A click on it is the way out:
398
+
399
+ - **Nothing unsaved** → leaves edit mode like `cancel()` (`update:editing` `false`, back to the list,
400
+ focus on the «Edit emails» link).
401
+ - **Unsaved changes** → stays in edit mode and moves the focus back into the form (the last field
402
+ the user was in, or the first one). Nothing is lost.
403
+ - ESC still closes the popover and leaves the mode, as before. The trigger sits under the layer, so
404
+ a pointer click on it is a click on the layer; the keyboard path (`close()`, ESC) is unchanged.
405
+
406
+ The cell cannot see inside the slot, so the editor reports its state: the `#editor` slot gets
407
+ `setDirty`, and `DsEmailEditor` emits `dirty-change`:
408
+
409
+ ```vue
410
+ <template #editor="{ close, cancel, setDirty }">
411
+ <DsEmailEditor … @dirty-change="setDirty" @cancel="cancel" @close="close" />
412
+ </template>
413
+ ```
414
+
415
+ An editor that never reports counts as clean, so existing apps get «click on the layer leaves edit
416
+ mode». Use `teleported` in tables and scrollers: inline, the layer only covers what the popover's own
417
+ stacking context covers. Keyboard focus is not trapped: Tab can still leave the popover.
418
+
356
419
  ### Props
357
420
 
358
421
  | Prop | Type | Default | Description |
@@ -386,22 +449,22 @@ also provides the `editor` slot, the same 300px popover swaps the list for that
386
449
 
387
450
  ### Events
388
451
 
389
- | Event | Payload | When |
390
- | ---------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
391
- | `update:open` | `boolean` | The popover opened or closed (hover, pin, ESC, outside). |
392
- | `copy` | `DsContactItem` | Emitted once a row's value is on the clipboard (re-emitted from the list). |
393
- | `correct` | `DsContactItem` | Thumbs-up on a row. |
394
- | `incorrect` | `DsContactItem` | Thumbs-down on a row. |
395
- | `reveal` | — | The «Show details» CTA was clicked. Run your reveal flow, then pass the unmasked `items` back (and drive `revealing` meanwhile). |
396
- | `edit` | — | The «Edit emails» link was clicked (`edit-label`). With an `editor` slot the popover also enters edit mode. |
397
- | `update:editing` | `boolean` | Edit mode was entered or left (link, `cancel()`, `close()`, ESC, the popover closing). |
452
+ | Event | Payload | When |
453
+ | ---------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
454
+ | `update:open` | `boolean` | The popover opened or closed (hover, pin, ESC, outside). |
455
+ | `copy` | `DsContactItem` | Emitted once a row's value is on the clipboard (re-emitted from the list). |
456
+ | `correct` | `DsContactItem` | Thumbs-up on a row. |
457
+ | `incorrect` | `DsContactItem` | Thumbs-down on a row. |
458
+ | `reveal` | — | The «Show details» CTA was clicked. Run your reveal flow, then pass the unmasked `items` back (and drive `revealing` meanwhile). |
459
+ | `edit` | — | The «Edit emails» link was clicked (`edit-label`). With an `editor` slot the popover also enters edit mode. |
460
+ | `update:editing` | `boolean` | Edit mode was entered or left (link, `cancel()`, `close()`, ESC, a click on the backdrop with a clean editor, the popover closing). |
398
461
 
399
462
  ### Slots
400
463
 
401
- | Slot | Where | Use |
402
- | --------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
403
- | `actions` | Right side of the popover's header | Extra header controls of the app. Sits next to the reveal CTA and the edit link. |
404
- | `editor` | The whole popover, in edit mode | The editor (`DsEmailEditor`). Slot props `{ close, cancel }`: `close()` closes the popover, `cancel()` returns to the list. |
464
+ | Slot | Where | Use |
465
+ | --------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
466
+ | `actions` | Right side of the popover's header | Extra header controls of the app. Sits next to the reveal CTA and the edit link. |
467
+ | `editor` | The whole popover, in edit mode | The editor (`DsEmailEditor`). Slot props `{ close, cancel, setDirty }`: `close()` closes the popover, `cancel()` returns to the list, `setDirty(boolean)` reports unsaved changes (wire `@dirty-change="setDirty"`): a click on the backdrop leaves edit mode when clean and refocuses the form when dirty. |
405
468
 
406
469
  ### Teleported popover (tables and scrollers)
407
470
 
@@ -643,7 +706,8 @@ colour `$contact-data-badge-a-plus-ink`. Mirrored 1:1 from the contract partial.
643
706
  ## DsEmailEditor
644
707
 
645
708
  The **«Edit emails» form** of a contact: a header (title, optional back and close), one input per
646
- email with a remove button, «+ Add email», the verification note and Cancel / Save. It is shown
709
+ email with a remove button (flat, or under subtitles with `groups`), «+ Add email», the verification
710
+ note and Cancel / Save. It is shown
647
711
  inside the contact cell popover and in the full-profile contact card, and works on its own in any
648
712
  ~300-320px panel.
649
713
 
@@ -656,11 +720,12 @@ job. There are no status marks (pills) inside the editor: the state is not shown
656
720
 
657
721
  ### Props
658
722
 
659
- | Prop | Type | Default | Description |
660
- | -------- | --------------------- | ------- | --------------------------------------------------------------------------------------------- |
661
- | `items` | `{ value: string }[]` | — | The current emails (required). Seeds the rows on mount and is the baseline of «what changed». |
662
- | `copy` | `DsEmailEditorCopy` | — | Every visible string (required). The app owns it. |
663
- | `saving` | `boolean` | `false` | The app's save is in flight: Save spins and the whole form is locked (see «Saving»). |
723
+ | Prop | Type | Default | Description |
724
+ | -------- | ----------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
725
+ | `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. |
726
+ | `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. |
727
+ | `copy` | `DsEmailEditorCopy` | — | Every visible string (required). The app owns it. |
728
+ | `saving` | `boolean` | `false` | The app's save is in flight: Save spins and the whole form is locked (see «Saving»). |
664
729
 
665
730
  #### `copy` keys
666
731
 
@@ -680,11 +745,12 @@ job. There are no status marks (pills) inside the editor: the state is not shown
680
745
 
681
746
  ### Events
682
747
 
683
- | Event | Payload | When |
684
- | -------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
685
- | `cancel` | — | Cancel or the header's back button was used (leave without saving). |
686
- | `close` | — | The header's close button was used. Dismissing the host (popover, panel) is the consumer's job. |
687
- | `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). |
748
+ | Event | Payload | When |
749
+ | -------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
750
+ | `cancel` | — | Cancel or the header's back button was used (leave without saving). |
751
+ | `close` | — | The header's close button was used. Dismissing the host (popover, panel) is the consumer's job. |
752
+ | `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. |
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). |
688
754
 
689
755
  ### Behaviour
690
756
 
@@ -694,7 +760,8 @@ job. There are no status marks (pills) inside the editor: the state is not shown
694
760
  email gets `invalidEmail`; a repeat (trimmed, case-insensitive) gets `duplicateEmail` on the
695
761
  later occurrences. An invalid text is never also reported as a duplicate. Empty rows are
696
762
  discarded, never an error. With errors, Save emits nothing and focuses the first failing row.
697
- - «+ Add email» appends an empty row and focuses it.
763
+ - «+ Add email» appends an empty row at the end and focuses it. With `groups` it goes after the last
764
+ group, in an untitled section (no subtitle).
698
765
  - **Saving**: with `saving` the Save button shows its own loading state (`DsButton` `loading`: spinner,
699
766
  `aria-busy`, not clickable) and the inputs, «Add email», the remove buttons, Cancel, back and close are
700
767
  disabled, so there are no edits and no double submit; `save` is not emitted again. The form region
@@ -712,6 +779,46 @@ job. There are no status marks (pills) inside the editor: the state is not shown
712
779
  note `info` (16, `muted`), back `chevron_left` (20, filled, `default`), close `close` (20, `muted`).
713
780
  The design's 18px and 14px glyphs move to 20 and 16, the sizes `DsIcon` has.
714
781
 
782
+ #### Groups
783
+
784
+ Use `groups` when the app's back classifies each email (work / direct, by its domain) and the
785
+ editor must show them ALL, not only the emails of the column it was opened from. Otherwise an
786
+ email added from «Direct email» lands in «Work email» after saving, vanishes from the editor and
787
+ re-adding it hits the duplicate error.
788
+
789
+ ```vue
790
+ <DsEmailEditor
791
+ :groups="[
792
+ { title: t('emails.work'), items: workEmails.map((value) => ({ value })) },
793
+ { title: t('emails.direct'), items: directEmails.map((value) => ({ value })) },
794
+ ]"
795
+ :copy="copy"
796
+ :saving="saving"
797
+ @save="persist"
798
+ @cancel="cancel"
799
+ @close="close"
800
+ />
801
+ ```
802
+
803
+ - Each group with rows renders a section with its `title` as a subtitle above the rows. The subtitle
804
+ uses the same type and ink as the section header of the `DsContactCell` popover list
805
+ («Work emails (2)»: `micro` 10px, bold, uppercase, 0.6px tracking, `contact-data-ink-muted`),
806
+ without the count and without the ruled band. A group with no emails, or whose rows were all
807
+ removed, renders nothing, not even its subtitle.
808
+ - **New rows go at the end, without a subtitle**, in an untitled section after the groups. The
809
+ editor cannot know where the back will put an email: after saving, the app re-renders with the
810
+ new `groups` and each one shows up in its own.
811
+ - Everything else is shared across groups: validation (format, and duplicates are checked across
812
+ ALL rows of all groups and the new ones, trimmed and case-insensitive), remove, the Save rule,
813
+ `dirty-change`, `saving`, and the focus (the first field of the first group).
814
+ - `save(values, changedCount)` keeps the flat shape: `values` is every row in display order (groups
815
+ in order, then the new rows) and `changedCount` counts the new or edited ones, so an app that
816
+ diffs by value works with `items` or `groups` alike.
817
+ - `groups` wins over `items` when both are passed. Like `items`, it is read when the editor mounts
818
+ (and as the baseline of «what changed»); a later change does not reset what the user is typing.
819
+ - A11y: each titled section is a `role="group"` named by its subtitle (`aria-labelledby`); the
820
+ untitled section has no role.
821
+
715
822
  #### Where it deliberately differs from the design export
716
823
 
717
824
  The export's input draws an accent focus border, bold text on focus and a dark rest border. The
@@ -2236,7 +2343,11 @@ consumer can opt into controlling it via `v-model:visible`.
2236
2343
 
2237
2344
  ## DsModal
2238
2345
 
2239
- Centered dialog with an optional header (title + close button) and footer action row.
2346
+ Dialog with an optional header (title + close button) and footer action row, vertically
2347
+ centered in the viewport by default. It never overflows the viewport: past the available
2348
+ height the body scrolls inside while the header and footer stay visible. Pass `top` to
2349
+ anchor it at an offset instead (long or variable-height forms, so it does not jump while
2350
+ the content grows).
2240
2351
  Portal-based by default (`fixed`), with a focus trap, scroll lock, and Escape-to-close;
2241
2352
  opting out of `fixed` renders it in-flow for specimen/embedded use. **Presentational
2242
2353
  only**: it never closes itself — the consumer holds the `open` boolean and flips it off
@@ -2251,8 +2362,8 @@ on `close`.
2251
2362
  | `showClose` | `boolean` | `true` | Show the icon-only × close button in the header. |
2252
2363
  | `width` | `string` | `'440px'` | Dialog width (any CSS length). |
2253
2364
  | `height` | `string` | `''` | Explicit dialog height (any CSS length). Empty = content height. |
2254
- | `top` | `string` | `'15vh'` | Top offset of the dialog inside the fixed backdrop (portal mode). |
2255
- | `center` | `boolean` | `false` | Center-align the body text. |
2365
+ | `top` | `string` | `''` | Opt-in top offset (any CSS length, portal mode). Empty = vertically centered; set (e.g. `'15vh'`) = anchored at that offset. |
2366
+ | `center` | `boolean` | `false` | Center-align the body **text** only. It does not affect the vertical placement (that is the default; use `top` to anchor). |
2256
2367
  | `fixed` | `boolean` | `true` | `true` portals to `body` with a backdrop, focus trap, scroll lock and Escape-to-close. `false` renders in-flow with none of that, for specimen/embedded use. |
2257
2368
  | `closeOnBackdrop` | `boolean` | `true` | Clicking the backdrop emits `close` (portal mode only). |
2258
2369
  | `closeOnEscape` | `boolean` | `true` | Pressing Escape emits `close` (portal mode only). |
@@ -2287,6 +2398,9 @@ on `close`.
2287
2398
 
2288
2399
  - Blocking decisions or confirmations (delete, discard changes) — pair with the `footer`
2289
2400
  slot for the action buttons.
2401
+ - Short, fixed-height dialogs (credits, confirmations): keep the default, centered.
2402
+ - Long or variable-height forms: pass `top` (e.g. `top="15vh"`) so the dialog stays pinned
2403
+ while its content grows instead of re-centering and jumping.
2290
2404
  - Use `fixed="false"` only for a static, in-flow specimen; real usage should keep the
2291
2405
  portal, focus trap, and scroll lock.
2292
2406
  - For transient, non-blocking feedback use `DsNotification` instead.
@@ -3016,6 +3130,7 @@ ring and 8px of padding on top of Element Plus. Positioning is pure CSS.
3016
3130
  | `teleported` | `boolean` | `false` | Renders the panel in `<body>`, so no ancestor's `overflow` clips it (a table cell, a scroller). See **Teleported** below. |
3017
3131
  | `block` | `boolean` | `false` | Root and trigger fill their container, so the whole surface opens the panel (a table cell painted as clickable end to end). |
3018
3132
  | `boundary` | `HTMLElement \| (() => DOMRect \| null) \| null` | `null` | Area the panel must stay inside besides the viewport. See **Boundary** below. |
3133
+ | `modal` | `boolean` | `false` | Blocks the page behind the panel with a transparent full-viewport layer and emits `backdrop-click`. See **Modal** below. |
3019
3134
 
3020
3135
  ### Placement
3021
3136
 
@@ -3091,6 +3206,26 @@ the area on its other side — a getter such as
3091
3206
  It is read on every measurement (open, scroll, resize), so a moving column is followed.
3092
3207
  Works inline and `teleported`. Without it nothing changes.
3093
3208
 
3209
+ ### Modal
3210
+
3211
+ `modal` (SALESQL-4183) makes the popover behave like a modal while it is open: a **transparent**,
3212
+ full-viewport layer sits right under the panel and above the page, so nothing behind it can be
3213
+ clicked or hovered. It does not dim (DsModal's `colors.$backdrop` is the dimming one) and the panel
3214
+ does not move; it exists only while `open` and is removed on close and on unmount, with no layout
3215
+ shift (it is `position: fixed`).
3216
+
3217
+ - A click on the layer emits **`backdrop-click`**. The popover does not decide what it means: the
3218
+ consumer closes it, refocuses a form, etc. (`DsContactCell` leaves edit mode or refocuses).
3219
+ - `closeOnOutside` keeps its meaning: a press on the layer is an outside press, inline and teleported
3220
+ alike. Turn it off when `backdrop-click` is the only thing that should react.
3221
+ - The layer is rendered next to the panel: teleported, inside the same fixed anchor in `<body>`
3222
+ (z-index 1999 under the panel's 2000, inside the anchor's 2002 stacking context); inline, in the
3223
+ root. Inline it only covers what the panel's own stacking context covers, so use `teleported` in
3224
+ tables and scrollers. While the panel fades out the layer stops intercepting, so the next click
3225
+ is not swallowed.
3226
+ - The `mousedown` on the layer is cancelled, so a focused field inside the panel keeps its focus.
3227
+ - Without it nothing changes (no layer).
3228
+
3094
3229
  ### Slots
3095
3230
 
3096
3231
  | Slot | Description |
@@ -3100,9 +3235,10 @@ Works inline and `teleported`. Without it nothing changes.
3100
3235
 
3101
3236
  ### Events
3102
3237
 
3103
- | Event | Payload | When |
3104
- | ------------- | --------- | ----------------------------------------------------------- |
3105
- | `update:open` | `boolean` | Trigger clicked, Escape pressed, or a press landed outside. |
3238
+ | Event | Payload | When |
3239
+ | ---------------- | --------- | ----------------------------------------------------------- |
3240
+ | `update:open` | `boolean` | Trigger clicked, Escape pressed, or a press landed outside. |
3241
+ | `backdrop-click` | — | A click landed on the `modal` layer. |
3106
3242
 
3107
3243
  ```vue
3108
3244
  <DsPopover v-model:open="open" width="260px">
@@ -3118,6 +3254,9 @@ Works inline and `teleported`. Without it nothing changes.
3118
3254
  - Escape closes when `closeOnEscape` is true.
3119
3255
  - Outside dismissal listens on `mousedown`, so a press that starts outside dismisses the
3120
3256
  panel even if the pointer is released over it.
3257
+ - `modal` blocks the pointer only: the layer is `aria-hidden`, keyboard focus is **not** trapped
3258
+ (Tab can still leave the panel) and the panel does not claim `aria-modal`. Keep that in mind
3259
+ before using it for anything beyond blocking stray clicks.
3121
3260
 
3122
3261
  ### Chrome
3123
3262
 
package/llms.txt CHANGED
@@ -40,7 +40,7 @@
40
40
  - DsTable (Data): Data-dense table with two composition modes: **declarative** (`columns` + `rows`, with
41
41
  - DsVerificationIcon (Data): Status glyph for a contact data point (email/phone): verified, unverified, or newly
42
42
  - DsAlert (Feedback): Inline banner for status/confirmation messages (success, info, warning, error). It
43
- - DsModal (Feedback): Centered dialog with an optional header (title + close button) and footer action row.
43
+ - DsModal (Feedback): Dialog with an optional header (title + close button) and footer action row, vertically
44
44
  - DsNotification (Feedback): Fixed-position toast card for transient feedback (saved, updated, failed…). It renders
45
45
  - DsTooltip (Feedback): Dark bubble that describes a wrapped trigger on hover or keyboard focus, with 4-way
46
46
  - DsCheckbox (Forms): Checked / unchecked / indeterminate selection control. **Presentational only**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesql/sql_components_vue3",
3
- "version": "3.19.0",
3
+ "version": "3.22.0",
4
4
  "description": "Librería de componentes Vue 3 (SalesQL)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",