@salesql/sql_components_vue3 3.2.0 → 3.4.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.
Files changed (48) hide show
  1. package/dist/composables/useViewportClamp.d.ts +2 -2
  2. package/dist/constants/contact-data.d.ts +100 -0
  3. package/dist/constants/events.d.ts +8 -0
  4. package/dist/constants/pickers.d.ts +36 -0
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.ts +25 -0
  8. package/dist/index.es.js +2516 -1342
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/sql_components_vue3.css +1 -1
  11. package/dist/stories/StoryStage.vue.d.ts +12 -0
  12. package/dist/ui/DsAddToSequence/DsAddToSequence.types.d.ts +35 -0
  13. package/dist/ui/DsAddToSequence/DsAddToSequence.vue.d.ts +146 -0
  14. package/dist/ui/DsAddToSequence/index.d.ts +2 -0
  15. package/dist/ui/DsButton/DsButton.types.d.ts +1 -0
  16. package/dist/ui/DsButton/DsButton.vue.d.ts +3 -0
  17. package/dist/ui/DsCompanyCard/DsCompanyCard.types.d.ts +26 -0
  18. package/dist/ui/DsCompanyCard/DsCompanyCard.vue.d.ts +69 -0
  19. package/dist/ui/DsCompanyCard/index.d.ts +2 -0
  20. package/dist/ui/DsCompanyLogo/DsCompanyLogo.types.d.ts +8 -0
  21. package/dist/ui/DsCompanyLogo/DsCompanyLogo.vue.d.ts +32 -0
  22. package/dist/ui/DsCompanyLogo/index.d.ts +2 -0
  23. package/dist/ui/DsContactCell/DsContactCell.types.d.ts +45 -0
  24. package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +203 -0
  25. package/dist/ui/DsContactCell/index.d.ts +2 -0
  26. package/dist/ui/DsContactList/DsContactList.types.d.ts +26 -0
  27. package/dist/ui/DsContactList/DsContactList.vue.d.ts +139 -0
  28. package/dist/ui/DsContactList/index.d.ts +2 -0
  29. package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.types.d.ts +13 -0
  30. package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue.d.ts +41 -0
  31. package/dist/ui/DsDeliverabilityBadge/index.d.ts +2 -0
  32. package/dist/ui/DsMaskedValue/DsMaskedValue.types.d.ts +9 -0
  33. package/dist/ui/DsMaskedValue/DsMaskedValue.vue.d.ts +32 -0
  34. package/dist/ui/DsMaskedValue/index.d.ts +2 -0
  35. package/dist/ui/DsMoreCountChip/DsMoreCountChip.types.d.ts +8 -0
  36. package/dist/ui/DsMoreCountChip/DsMoreCountChip.vue.d.ts +31 -0
  37. package/dist/ui/DsMoreCountChip/index.d.ts +2 -0
  38. package/dist/ui/DsPopover/DsPopover.types.d.ts +21 -0
  39. package/dist/ui/DsPopover/DsPopover.vue.d.ts +31 -2
  40. package/dist/ui/DsSavedButton/DsSavedButton.types.d.ts +23 -0
  41. package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +135 -0
  42. package/dist/ui/DsSavedButton/index.d.ts +2 -0
  43. package/dist/ui/DsTagPicker/DsTagPicker.types.d.ts +25 -0
  44. package/dist/ui/DsTagPicker/DsTagPicker.vue.d.ts +130 -0
  45. package/dist/ui/DsTagPicker/index.d.ts +2 -0
  46. package/llms-full.txt +610 -20
  47. package/llms.txt +10 -0
  48. package/package.json +1 -1
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v3.2.0)
1
+ # @salesql/sql_components_vue3 — SalesQL Design System (v3.4.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
 
@@ -37,8 +37,18 @@ Components that draw an icon emit `<i class="material-symbols-filled">{ligature}
37
37
 
38
38
  Components size their own glyphs (their scoped rules outrank the 20px default), so the class only has to supply the family and fill. Consumers with a `#leading`/`#trailing` slot may pass any element they like instead.
39
39
 
40
- ## Components (32)
41
-
40
+ ## Components (42)
41
+
42
+ - **DsCompanyCard** (Company) — The card the prospector opens from its company cell — the design export's `CompanyDetails`
43
+ - **DsCompanyLogo** (Company) — A company's logo in the DS hairline box: white, 1px `slate-tint` ring, 4px radius, the image
44
+ - **DsAddToSequence** (Contact data) — The canonical "Add to sequence" control: a trigger and a panel with the **SEND TO** choice
45
+ - **DsContactCell** (Contact data) — The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
46
+ - **DsContactList** (Contact data) — The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
47
+ - **DsDeliverabilityBadge** (Contact data) — The contract's **single** verification badge (§3.3, «modelo Lusha»): a bare green `A+`
48
+ - **DsMaskedValue** (Contact data) — An email or phone string rendered **verbatim**, with the contract's two-tone treatment when
49
+ - **DsMoreCountChip** (Contact data) — The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
50
+ - **DsSavedButton** (Contact data) — **The** one canonical "Saved" control (Ari: identical everywhere — rows, drawers, bulk bars).
51
+ - **DsTagPicker** (Contact data) — The canonical "Tag" control («Tagged as X +N», Lusha style). Reads as a **Tag** button until
42
52
  - **DsAvatar** (Core) — Contact/user avatar: an image, generated initials with a deterministic color hash, or an
43
53
  - **DsBadge** (Core) — Solid, white-text pill for value types and counts (e.g. "Work", "New"). **Presentational
44
54
  - **DsButton** (Core) — Standard clickable control with the DS variant/size vocabulary, plus icon-only
@@ -73,6 +83,568 @@ Components size their own glyphs (their scoped rules outrank the 20px default),
73
83
  - **DsPopover** (Overlays) — Click-triggered card panel anchored to a trigger. Built **native** — no `element-plus`,
74
84
 
75
85
  ---
86
+ <!-- DsCompanyCard · Company -->
87
+
88
+ ## DsCompanyCard
89
+
90
+ The card the prospector opens from its company cell — the design export's `CompanyDetails`
91
+ (`prospector/ProspectorRedesignApp.jsx`), SALESQL-4056.
92
+
93
+ - **Header:** `DsCompanyLogo` (34px), the name, a globe link to the website (with a
94
+ tooltip) and LinkedIn's "in" badge.
95
+ - **Rows:** one per detail — glyph, uppercase label, value. A detail with an empty value
96
+ is **not rendered**, so a field the API did not send never shows blank. A detail with
97
+ `href` is a link in the accent ink (the export's "Website" row).
98
+
99
+ **Content only.** Put it in a `DsPopover` with `flush` (the panel draws the ring, radius
100
+ and shadow) and, inside a table or any clipping container, `teleported`:
101
+
102
+ ```vue
103
+ <DsPopover v-model:open="open" placement="bottom-start" width="320px" flush teleported>
104
+ <template #trigger>…the company cell…</template>
105
+ <DsCompanyCard :name="company.name" :logo="company.logo" :details="details" />
106
+ </DsPopover>
107
+ ```
108
+
109
+ It knows nothing about the API payload: the app maps its company into `details` with its
110
+ own i18n labels.
111
+
112
+ ### Props
113
+
114
+ | Prop | Type | Default | Description |
115
+ | --------------- | ------------------- | ------- | -------------------------------------------- |
116
+ | `name` | `string` | — | Company name (required). |
117
+ | `logo` | `string` | `''` | Logo URL; empty or failing → the initial. |
118
+ | `websiteUrl` | `string` | `''` | Header globe link. Empty → no globe. |
119
+ | `websiteLabel` | `string` | `''` | Globe tooltip + accessible name. |
120
+ | `linkedinUrl` | `string` | `''` | Header LinkedIn badge. Empty → no badge. |
121
+ | `linkedinLabel` | `string` | `''` | Badge accessible name. |
122
+ | `details` | `DsCompanyDetail[]` | `[]` | `{ id, icon, label, value, href? }` per row. |
123
+
124
+ ### Deltas from the export
125
+
126
+ - **Chrome comes from `DsPopover`**: 6px radius and the dropdown shadow, not the export's
127
+ 8px / `0 8px 28px`. Same verdict as the popover radius in SALESQL-3535 (kept).
128
+ - Off-scale type steps snap to the DS scale: label 11 → 10 (`micro`, like DsContactList's
129
+ uppercase labels), "in" 11 → 12, row glyph 17 → 16, weight 800 → 900.
130
+
131
+ ---
132
+
133
+ <!-- DsCompanyLogo · Company -->
134
+
135
+ ## DsCompanyLogo
136
+
137
+ A company's logo in the DS hairline box: white, 1px `slate-tint` ring, 4px radius, the image
138
+ contained inside. When there is no logo **or it fails to load**, it shows the first
139
+ character of `name` in muted ink — the design export's `CompanyLogo` (SALESQL-4056).
140
+
141
+ Not `DsAvatar`: that one puts initials on a hashed colour and has no error fallback. A
142
+ broken logo URL is common (a private bucket answers 403), so the fallback lives here.
143
+
144
+ ### Props
145
+
146
+ | Prop | Type | Default | Description |
147
+ | ------ | -------- | ------- | ----------------------------------------------------------------- |
148
+ | `src` | `string` | `''` | Logo URL. Empty or failing → the initial. |
149
+ | `name` | `string` | `''` | Its first character is the fallback (`?` when empty). |
150
+ | `size` | `number` | `36` | Box side in px. The design: 36 in the table cell, 34 in the card. |
151
+
152
+ The image is decorative (`alt=""`): the company name is always rendered next to it.
153
+
154
+ ---
155
+
156
+ <!-- DsAddToSequence · Contact data -->
157
+
158
+ ## DsAddToSequence
159
+
160
+ The canonical "Add to sequence" control: a trigger and a panel with the **SEND TO** choice
161
+ (Work / Direct email as stacked radio cards), a searchable multi-select of campaigns and an
162
+ **Add** confirm that stays disabled until something is selected. Measured from the design
163
+ export's `SequenceButton` / `sequenceMenu`. One affordance for the full profile and the
164
+ bulk bars — the trigger switches look with `variant` and `size`.
165
+
166
+ The library knows nothing about campaigns or sending: it renders the list you pass and
167
+ emits the intent.
168
+
169
+ ### Props
170
+
171
+ | Prop | Type | Default | Description |
172
+ | ------------------- | --------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
173
+ | `label` | `string` | — | Trigger label (required). |
174
+ | `tooltip` | `string` | `''` | Empty = no tooltip. Leave it empty when it would only repeat the label (the export's tip does); it hides while the panel is open. |
175
+ | `channelsLabel` | `string` | — | Caption above the radios ("Send to") (required). |
176
+ | `channels` | `DsSequenceChannelOption[]` | — | `{ value: 'work' \| 'direct', label }` — the app passes the labels (required). |
177
+ | `defaultChannel` | `'work' \| 'direct'` | `'work'` | Initially selected channel. |
178
+ | `campaignsLabel` | `string` | `''` | Caption above the list ("Recent campaigns"). Empty = none. |
179
+ | `campaigns` | `DsPickerOption[]` | — | The campaigns to offer (required). |
180
+ | `searchPlaceholder` | `string` | `''` | |
181
+ | `emptyLabel` | `string` | `''` | Shown when the search matches nothing. |
182
+ | `addLabel` | `string` | — | The confirm (required). |
183
+ | `variant` | `'secondary' \| 'primary'` | `'secondary'` | `DsButton outline` (white, hairline ring) or `DsButton primary` (solid accent). |
184
+ | `size` | `'medium' \| 'large'` | `'medium'` | 32px / 36px trigger. |
185
+ | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) — the bulk-bar look beside `DsItemSelectorButton`. |
186
+ | `align` | `'start' \| 'end'` | `'end'` | Which trigger edge the 288px panel hangs from. |
187
+ | `disabled` | `boolean` | `false` | |
188
+
189
+ ### Events
190
+
191
+ | Event | Payload | When |
192
+ | ------------- | -------------------------------------------------------------- | --------------------------------------------- |
193
+ | `add` | `{ channel: 'work' \| 'direct', campaigns: DsPickerOption[] }` | Add clicked. Panel closes, selection resets. |
194
+ | `search` | `string` | The search text changed (filtering is local). |
195
+ | `update:open` | `boolean` | The panel opened or closed. |
196
+
197
+ ### Accessibility
198
+
199
+ - The trigger is a `DsButton` (`outline` / `primary`, `medium` / `large`) with
200
+ `aria-haspopup="dialog"` / `aria-expanded`; the channels are a native radio group
201
+ (`DsRadio`, one `name` per instance); campaigns are `DsCheckbox` rows.
202
+ - `Add` is a real disabled `DsButton` until a campaign is selected.
203
+
204
+ ### Design parity (export `SequenceButton`)
205
+
206
+ - Trigger: `send` glyph 16px + label; `secondary` is `DsButton outline` (white, hairline
207
+ ring — the export's), `primary` is `DsButton primary` (solid accent). Channel cards
208
+ `8px 12px`, radius 6, accent ring + tint when chosen. Panel 288px, list capped at 176px.
209
+ Mirrored.
210
+ - The search is the same filled grey `DsInput type="search"` the export draws — not a delta.
211
+ - **Logged deltas (accepted, Diego 22/09):** the trigger is the DS button composed (not
212
+ redrawn): **radius 4** vs the export's 6 (`pill` = fully round, for bulk bars), DS 14px/500
213
+ label vs 13.5px/700; trigger height 40px → `large` (36px) / default `medium` (32px); Add is
214
+ `DsButton` medium (32) vs 34; section captions 10.5px → `micro` (10px) in `slate-soft`
215
+ (`#5e666f`) vs the export's `#5c6670`; panel radius 6 vs 8.
216
+
217
+ ---
218
+
219
+ <!-- DsContactCell · Contact data -->
220
+
221
+ ## DsContactCell
222
+
223
+ The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
224
+ badge when it applies, the `+N` overflow chip, and a popover listing the whole group.
225
+ With `type` set it is also the **full-profile row** (type glyph on the left, §3.2).
226
+
227
+ ### Behaviour — hover opens, click pins, ESC closes
228
+
229
+ - **Hover** anywhere on the cell opens the popover (1 or N items, revealed or not) and emits
230
+ `update:open(true)` — lazy-load the group there if you need to.
231
+ - **Leaving** closes after `leaveDelay` (220 ms) unless pinned. Re-entering cancels.
232
+ - **Click** on the value pins it (leaving no longer closes); a second click releases.
233
+ - **ESC** (anywhere in the document) and a **click outside** close and un-pin.
234
+ - The popover opens **over the cell** (its top 8px above the trigger, like the export's
235
+ `TypedCell`), **start-aligned and shifted ¼ of the cell's width**, so the leading quarter of
236
+ the column stays free and it can be swept downward without the panel intercepting the
237
+ pointer. «Una lista se puede escanear sin clicks.» (contract §3.5)
238
+ - `disabled` removes the popover entirely — `+N` stays plain text (contract §3.10, class B1).
239
+
240
+ ### Props
241
+
242
+ | Prop | Type | Default | Description |
243
+ | ------------------------------ | -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
244
+ | `items` | `DsContactItem[]` | — | The group, **primary first**; `items[0]` is what the cell shows (required). |
245
+ | `count` | `number \| null` | `null` | Group size the chip subtracts from (`+N` = count − 1). Server count when it exists; else `items.length`. |
246
+ | `sections` | `DsContactSection[]` | `[]` | Unified columns (Emails: Work + Direct; Phones: Direct + HQ): the popover bands each type, one total. `items` still drives the cell. |
247
+ | `kind` | `'email' \| 'phone'` | — | Masked split rule; badge eligibility (required). |
248
+ | `type` | `DsContactType` | `''` | Full-profile row: draws the type glyph. Table cells omit it (the header names the type). |
249
+ | `label` | `string` | — | The popover variant name ("Work emails"). App copy (required). |
250
+ | `badgeLabel` | `string` | — | `A_PLUS_BADGE` (required). |
251
+ | `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
252
+ | `moreLabel` | `string` | `''` | Accessible name for the `+N` chip ("2 more emails"). |
253
+ | `emptyLabel` | `string` | `'—'` | Rendered when `items` is empty (a typographic dash, not copy). |
254
+ | `showRate` | `boolean` | `false` | Thumbs up / down in the popover rows. |
255
+ | `disabled` | `boolean` | `false` | No popover at all. |
256
+ | `placement` | `DsPopoverPlacement` | `'over-start'` | Popover side / alignment. `over-start` covers the cell like the export; `bottom-start` opens below it. |
257
+ | `offset` | `string` | `'25%'` | Popover anchor shift along the cell (the contract's ¼). |
258
+ | `popoverWidth` | `string` | `'300px'` | Popover width (export `DataPopover`). |
259
+ | `leaveDelay` | `number` | `220` | Grace before an unpinned popover closes after the pointer leaves (ms). |
260
+ | `copyLabel` … `incorrectLabel` | `string` | English | Accessible labels forwarded to the list's icon-only actions. |
261
+
262
+ ### Events
263
+
264
+ | Event | Payload | When |
265
+ | ------------- | --------------- | -------------------------------------------------------- |
266
+ | `update:open` | `boolean` | The popover opened or closed (hover, pin, ESC, outside). |
267
+ | `copy` | `DsContactItem` | A row's value was copied (re-emitted from the list). |
268
+ | `correct` | `DsContactItem` | Thumbs-up on a row. |
269
+ | `incorrect` | `DsContactItem` | Thumbs-down on a row. |
270
+
271
+ ### Slots
272
+
273
+ | Slot | Where | Use |
274
+ | --------- | ---------------------------------- | -------------------------------------- |
275
+ | `actions` | Right side of the popover's header | The app's Show details / Edit control. |
276
+
277
+ ### Feeding it from the app's view model
278
+
279
+ The cell classifies nothing. The consumer passes one **bucket** and adapts each item to
280
+ `DsContactItem` — one line per field:
281
+
282
+ ```ts
283
+ // legacy view model (contract §3.8) // typed contact_data block (§3.11), tomorrow
284
+ const toItem = (it) => ({ const toItem = (it) => ({
285
+ id: it.id, id: it.uid,
286
+ value: it.value, value: it.is_revealed ? it.value : it.preview,
287
+ masked: it.isMasked, masked: !it.is_revealed,
288
+ valid: it.status === 'valid', valid: it.verification === 'valid',
289
+ primary: it.isPrimary, primary: it.is_primary,
290
+ }); });
291
+
292
+ // Work email column → items = vm.workEmails.map(toItem), count = vm.counts.work
293
+ // Direct phone column (legacy shape) → items = [vm.mobilePhones[0] || vm.directPhones[0], ...rest].map(toItem)
294
+ // count = mobile + direct — NEVER vm.counts.phones (it includes HQ)
295
+ ```
296
+
297
+ Labels and badge strings come from the app's `contact-data-contract/contactDataCopy.js`
298
+ (`COLUMN_LABEL`, `TYPE_LABEL`, `A_PLUS_BADGE`, `A_PLUS_TOOLTIP`).
299
+
300
+ ### Accessibility
301
+
302
+ - The trigger is a real `<button>` with `aria-haspopup="dialog"` and `aria-expanded`; the
303
+ popover panel is a focusable `role="dialog"` (from `DsPopover`).
304
+ - The badge inside the trigger is **not** a tab stop (`focusable="false"`): nested
305
+ focusables inside a button are invalid, and the popover carries the same information.
306
+
307
+ ### Design parity (export `TypedCell` / `usePop`)
308
+
309
+ - Trigger 30px, gap 10, `0 8px` padding bleeding `−8px` into the cell, radius 6, open →
310
+ accent-bg. Value 14px in `$contact-data-value-ink` at `$contact-data-value-weight`.
311
+ Leave grace 220 ms, click pins, ESC / outside close — mirrored 1:1.
312
+ - The panel sits _over_ the trigger (`top: −8`) exactly like the export: `DsPopover` gained
313
+ `over-start` / `over-end` for it (Diego, 22/09). The ¼ shift is the contract's (§3.5), not
314
+ the export's.
315
+ - **Logged deltas (accepted):** popover chrome is `DsPopover`'s (radius 6, dropdown shadow)
316
+ rather than the export's (radius 8, deeper shadow). Type glyph 17px → `icon-size(16)`.
317
+
318
+ ---
319
+
320
+ <!-- DsContactList · Contact data -->
321
+
322
+ ## DsContactList
323
+
324
+ The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
325
+ Direct phones, HQ) or a full-profile block. Each row: type glyph · value (two-tone when
326
+ masked) · `A+` on valid emails · copy / rate as a hover overlay. Contract §3.2, §3.3, §3.5,
327
+ §3.7; measured from the design export's `PopItem` / `DataPopover`.
328
+
329
+ One group, one type — or, with `sections`, the export's unified Emails / Phones popover: a
330
+ quiet uppercase band per type («WORK (2)»), its rows under it, and one total in the header.
331
+
332
+ ### Props
333
+
334
+ | Prop | Type | Default | Description |
335
+ | ---------------- | -------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
336
+ | `items` | `DsContactItem[]` | `[]` | The group, primary first, as the view model delivers it. Never reordered. Omit when `sections` drive the rows. |
337
+ | `sections` | `DsContactSection[]` | `[]` | Unified variants: `{ type, label, items }` per type → a band + its rows; empty types are skipped. |
338
+ | `kind` | `'email' \| 'phone'` | — | Masked split rule, and whether a badge may ever render (required). |
339
+ | `type` | `DsContactType` | `''` | `work` · `direct` · `mobile` · `hq` · `other` → the left glyph. Omit for none. |
340
+ | `title` | `string` | `''` | Variant name in the header ("Work emails"). The total `(N)` is appended. App copy. |
341
+ | `badgeLabel` | `string` | — | `A_PLUS_BADGE` — rendered only on valid emails (required). |
342
+ | `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
343
+ | `showRate` | `boolean` | `false` | Adds thumbs up / down to unmasked rows. |
344
+ | `emptyLabel` | `string` | `''` | Shown when `items` is empty. Omit to render nothing. |
345
+ | `copyLabel` | `string` | `'Copy'` | Accessible label / title of the copy button. |
346
+ | `copiedLabel` | `string` | `'Copied!'` | Shown for ~1.2 s after a copy. |
347
+ | `correctLabel` | `string` | `'Correct'` | Accessible label of thumbs-up. |
348
+ | `incorrectLabel` | `string` | `'Incorrect'` | Accessible label of thumbs-down. |
349
+
350
+ `DsContactItem` is `{ id, value, masked, valid, primary, rating? }` — see `DsContactCell`
351
+ for the mapping from the app's view model.
352
+
353
+ ### Events
354
+
355
+ | Event | Payload | When |
356
+ | ----------- | --------------- | -------------------------------------------- |
357
+ | `copy` | `DsContactItem` | The row's value was copied to the clipboard. |
358
+ | `correct` | `DsContactItem` | Thumbs-up clicked (`showRate`). |
359
+ | `incorrect` | `DsContactItem` | Thumbs-down clicked (`showRate`). |
360
+
361
+ ### Slots
362
+
363
+ | Slot | Where | Use |
364
+ | --------- | ------------------------ | ------------------------------------------------------------------- |
365
+ | `actions` | Right side of the header | The app's Show / Edit control. The list knows nothing about reveal. |
366
+
367
+ ### Rules it enforces
368
+
369
+ - **Badge** = `kind === 'email' && item.valid`. Phones never; masked valid emails yes.
370
+ - **Masked rows have no actions** — there is no full value to copy or judge.
371
+ - **Keys** are `item.id`, falling back to the value. Never the index.
372
+
373
+ ### Accessibility
374
+
375
+ - `role="list"` on the rows; icon-only actions carry `aria-label` + `title`; rating buttons
376
+ expose `aria-pressed` from `item.rating`.
377
+ - The overlay is visible on `:hover` **and** `:focus-within`, so keyboard users reach copy /
378
+ rate too. The type glyph is `aria-hidden` (the header names the type).
379
+
380
+ ### Design parity (export `PopItem` / `DataPopover`)
381
+
382
+ - Row `7px 12px`, 1px tint divider, 16px type glyph, value 13px in `$contact-data-value-ink`
383
+ at `$contact-data-value-weight` (the contract's inverted hierarchy — the export's 600 /
384
+ `#1F2933` is overruled by the contract, which is newer). Header 12.5px/600 in
385
+ `$contact-data-header-ink` → `small` (13px).
386
+ - **Logged deltas:** row hover `#FCFCFD` → `$contact-data-row-hover` (`#F9F9F9`, the only
387
+ frozen hover); action glyph 15px → `icon-size(16)`; header 12.5px → 13px.
388
+
389
+ ---
390
+
391
+ <!-- DsDeliverabilityBadge · Contact data -->
392
+
393
+ ## DsDeliverabilityBadge
394
+
395
+ The contract's **single** verification badge (§3.3, «modelo Lusha»): a bare green `A+`
396
+ superscript with the tooltip that carries its meaning. Valid / Unverifiable / accept-all /
397
+ last-verified badges were retired on 2026-07-09 — nothing else renders.
398
+
399
+ **It does not decide whether to show.** The rule is the composer's and it is one line:
400
+ `valid && kind === 'email'`. Phones never carry verification, whatever their status; a
401
+ masked preview that is valid still gets the badge.
402
+
403
+ ### Props
404
+
405
+ | Prop | Type | Default | Description |
406
+ | ----------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------- |
407
+ | `label` | `string` | — | The glyph text. The app passes the contract's `A_PLUS_BADGE` (required). |
408
+ | `tooltip` | `string` | — | The meaning — `A_PLUS_TOOLTIP` — shown on hover/focus; also the accessible name (required). |
409
+ | `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Tooltip side. |
410
+ | `focusable` | `boolean` | `true` | Standalone, the glyph is a tab stop. Inside a focusable trigger pass `false`. |
411
+
412
+ ### Accessibility
413
+
414
+ - The glyph is `role="img"` with `aria-label` = `tooltip`, so a screen reader announces the
415
+ meaning rather than two letters.
416
+ - Standalone it is keyboard-reachable (`tabindex="0"`) and the tooltip opens on focus.
417
+ - **Known gap, recorded by the contract:** `#2E9E6E` on white is 3.37:1 at 9px, below the
418
+ 4.5:1 AA floor. It is frozen because three surfaces must match; raising it is a design
419
+ decision (contract OPEN list).
420
+
421
+ ### Design parity (export `QualityBadge`)
422
+
423
+ 9px / 800 / 0.2px tracking, no box, `align-self: flex-start; margin-top: -2px; flex: none`,
424
+ colour `$contact-data-badge-a-plus-ink`. Mirrored 1:1 from the contract partial.
425
+
426
+ ---
427
+
428
+ <!-- DsMaskedValue · Contact data -->
429
+
430
+ ## DsMaskedValue
431
+
432
+ An email or phone string rendered **verbatim**, with the contract's two-tone treatment when
433
+ the **server** masked it (§3.7): the redacted part in the mask tone, the visible part —
434
+ domain, country prefix — in the inherited ink. It never masks anything itself. _The front
435
+ is never what obfuscates a value we sell_: to mask, it would have to hold the full value,
436
+ and holding it is the leak.
437
+
438
+ ### Props
439
+
440
+ | Prop | Type | Default | Description |
441
+ | -------- | -------------------- | ------- | ---------------------------------------------------------------------- |
442
+ | `value` | `string` | — | The string exactly as the API sent it — masked preview or full value. |
443
+ | `kind` | `'email' \| 'phone'` | — | Split rule: whole local part for emails, glyph runs for phones. |
444
+ | `masked` | `boolean` | `false` | `true` when `value` is the server's masked form. Off = one plain span. |
445
+
446
+ The consumer decides `masked`: `isMasked` on the legacy view model, `!is_revealed` on the
447
+ typed block. Shape detection is never applied here.
448
+
449
+ ### Split rules (`splitMaskedValue`, exported)
450
+
451
+ - **Email** — the local part is the redaction (`***`, `...`, `•••`); no `@` → all masked.
452
+ - **Phone** — every run of `*` / `•` / `.` is a redaction; a **single** dot is a real
453
+ separator (`+1.415.555.0100`). No prefix is assumed (`8008...` ships with none).
454
+ - Concatenating the segments always yields the input. Nothing is re-grouped.
455
+
456
+ ### Design parity
457
+
458
+ - Mask tone `$contact-data-mask-ink` (#b6bbc0) from the contract partial; the redacted run is
459
+ bold and letter-spaced 1px like the export's `DOTS`. Asterisk runs are pulled down
460
+ (`vertical-align: -0.16em`) because Mulish draws `*` at cap height — without it the stars
461
+ float above the domain. A redaction that follows a visible prefix gets a 2px margin (the
462
+ export's `{tail} {dots}` gap) instead of an inserted space, so the text stays verbatim.
463
+ - `title` exposes the full value only when unmasked (the export does the same).
464
+
465
+ ### When to use
466
+
467
+ Inside `DsContactCell` and `DsContactList`, or anywhere a contact-data value is printed on
468
+ its own with the contract's masked treatment.
469
+
470
+ ---
471
+
472
+ <!-- DsMoreCountChip · Contact data -->
473
+
474
+ ## DsMoreCountChip
475
+
476
+ The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
477
+ **N is the overflow, not the group size**, and `+0` never renders. Compute the overflow
478
+ with `overflowFromGroupSize(groupSize)` — never subtract by hand, and never feed it the
479
+ aggregate phone count that includes HQ.
480
+
481
+ ### Props
482
+
483
+ | Prop | Type | Default | Description |
484
+ | ---------- | --------- | ------- | ----------------------------------------------------------------------------- |
485
+ | `overflow` | `number` | — | Items beyond the one shown. `<= 0` renders nothing (required). |
486
+ | `active` | `boolean` | `false` | Accent state while the owning cell's popover is open. |
487
+ | `label` | `string` | `''` | Accessible name when `+N` alone lacks context ("2 more emails"). App wording. |
488
+
489
+ ### Events
490
+
491
+ None. Purely presentational; the hover / pin behaviour belongs to `DsContactCell`.
492
+
493
+ ### Design parity (export `MoreChip`)
494
+
495
+ - 22 × 20 min box, `0 6px` padding, fully round, 1px ring; rest = white / tint ring /
496
+ muted ink, active = accent-bg / accent-mid ring / accent ink. Mirrored 1:1.
497
+ - **Logged delta:** the export sets 11px; the type scale has no 11 step, so `caption`
498
+ (12px) is used. To be settled in the parity pass.
499
+
500
+ ### When to use
501
+
502
+ Only inside `DsContactCell` / `DsContactList` compositions. It is not a generic counter.
503
+
504
+ ---
505
+
506
+ <!-- DsSavedButton · Contact data -->
507
+
508
+ ## DsSavedButton
509
+
510
+ **The** one canonical "Saved" control (Ari: identical everywhere — rows, drawers, bulk bars).
511
+ A folder-tinted glyph, a neutral label and a caret; the folder **name** lives in the tooltip,
512
+ never in the label; click opens the folder picker to re-file. Measured from the design
513
+ export's `SavedButton` / `FolderMenu`.
514
+
515
+ Folder CRUD stays in the app: the footer only tells you the user wants a new one.
516
+
517
+ ### Props
518
+
519
+ | Prop | Type | Default | Description |
520
+ | ------------------- | ------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
521
+ | `label` | `string` | — | Neutral label — "Saved", or "Save" before the first save (required). |
522
+ | `tooltip` | `string` | `''` | "Saved in {folder} · change folder". Empty = no tooltip. Hides while the picker is open. |
523
+ | `folder` | `DsPickerOption \| null` | `null` | The current folder; tints the glyph. `null` = no glyph. |
524
+ | `folders` | `DsPickerOption[]` | — | Every folder the user can pick (required). |
525
+ | `searchPlaceholder` | `string` | `''` | |
526
+ | `emptyLabel` | `string` | `''` | Shown when the search matches nothing. |
527
+ | `createLabel` | `string` | `''` | Footer action ("New Folder"). Empty and no `footer` slot = no footer. |
528
+ | `icon` | `string` | `'folder'` | Material Symbols ligature for the folder glyph. |
529
+ | `size` | `'medium' \| 'large'` | `'medium'` | 32px for rows / profile, 36px for action and bulk bars. |
530
+ | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Add contacts to»). Off = the design's table / profile trigger. |
531
+ | `align` | `'start' \| 'end'` | `'end'` | Which trigger edge the 300px panel hangs from. |
532
+ | `disabled` | `boolean` | `false` | |
533
+
534
+ `DsPickerOption` is `{ id, name, color? }` — map frontend-app's `Folder` with
535
+ `{ id: f.uuid, name: f.name, color: f.color }`.
536
+
537
+ ### Events
538
+
539
+ | Event | Payload | When |
540
+ | ------------- | ---------------- | --------------------------------------------------------------- |
541
+ | `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here. |
542
+ | `create` | `string` | "New Folder" clicked; payload is the search text typed so far. |
543
+ | `search` | `string` | The search text changed (filtering is local). |
544
+ | `update:open` | `boolean` | The panel opened or closed. |
545
+
546
+ ### Slots
547
+
548
+ | Slot | Scope | Use |
549
+ | -------- | ------------------- | ----------------------------------------------------- |
550
+ | `footer` | `{ query: string }` | Replace the create button with the app's own control. |
551
+
552
+ ### Accessibility
553
+
554
+ - The trigger is a `DsButton` (`outline`, `medium` / `large`) — a real `<button>` with
555
+ `aria-haspopup="listbox"` / `aria-expanded`, and the DS focus ring, hover and disabled
556
+ states for free; the folder list is a native radio group (`DsRadio`, one `name` per
557
+ instance), so arrow keys move the selection.
558
+ - The whole row is the radio's label: any click on it picks.
559
+
560
+ ### Design parity (export `SavedButton` / `FolderMenu`)
561
+
562
+ - Trigger: folder-tinted glyph 16px, neutral label, caret 14px muted, 32px / 36px. Rows
563
+ 40px with the folder glyph at 20px in its colour; current row accent-bg. Panel 300px; list
564
+ capped at 216px. Mirrored.
565
+ - Shape follows the design per context (Diego, 22/09): squared in table rows and the profile
566
+ (the export's `SavedButton`), `pill` in the bulk bar where the design uses the
567
+ `DsItemSelectorButton` shape («Add contacts to»). The search is the same filled grey
568
+ `DsInput type="search"` the export draws — not a delta.
569
+ - Label weight **700**, the export's and the DS rule («700 for labels and emphasis», the weight
570
+ of `DsItemSelectorButton`) — a selector, not a CTA.
571
+ - **Logged deltas (accepted, pending Ariel's confirmation of the ramp):** the trigger is the
572
+ DS `DsButton outline` composed (not redrawn): the export's hairline ring, but radius 4 vs its
573
+ 6 and the 14px token vs 12.5px; folder glyph 15px → 16; panel chrome is `DsPopover`'s
574
+ (radius 6) rather than the export's radius 8. The per-row Edit / Delete menu and the create
575
+ form are app flows, not library UI.
576
+
577
+ ---
578
+
579
+ <!-- DsTagPicker · Contact data -->
580
+
581
+ ## DsTagPicker
582
+
583
+ The canonical "Tag" control («Tagged as X +N», Lusha style). Reads as a **Tag** button until
584
+ tags are applied, then as **Tagged as {first}** with the overflow chip; the picker has
585
+ search, checkbox rows with a colour dot, a create affordance and an **Apply** footer.
586
+ Measured from the design export's `tagBtn` / `tagsLine` / `tagMenu`.
587
+
588
+ Named `DsTagPicker`, not `DsTag`: `DsTag` is already the DS outlined chip.
589
+
590
+ **Selection is a working copy.** Toggling checkboxes changes nothing outside the panel;
591
+ `apply` fires once, with the final list. Closing without Apply discards.
592
+
593
+ ### Props
594
+
595
+ | Prop | Type | Default | Description |
596
+ | ------------------- | --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
597
+ | `label` | `string` | — | Trigger label while untagged ("Tag") (required). |
598
+ | `taggedAsLabel` | `string` | — | Prefix once tagged ("Tagged as") — the first tag's name follows (required). |
599
+ | `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
600
+ | `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
601
+ | `applyLabel` | `string` | — | The footer confirm (required). |
602
+ | `searchPlaceholder` | `string` | `''` | |
603
+ | `emptyLabel` | `string` | `''` | Shown when nothing matches and nothing can be created. |
604
+ | `createLabel` | `string` | `''` | Prefix of the create row («Create “{query}”»). Empty = no create row. |
605
+ | `moreLabel` | `string` | `''` | Accessible name for the `+N` chip. |
606
+ | `size` | `'medium' \| 'large'` | `'medium'` | |
607
+ | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
608
+ | `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
609
+ | `disabled` | `boolean` | `false` | |
610
+
611
+ Map frontend-app's `Tag` with `{ id: t.id, name: t.name, color: t.color }` — the API takes
612
+ tags by numeric `id` (`projects_ids`), unlike folders.
613
+
614
+ ### Events
615
+
616
+ | Event | Payload | When |
617
+ | ------------- | ------------------ | ------------------------------------------------------------------------ |
618
+ | `apply` | `DsPickerOption[]` | Apply clicked: the full new selection, in `options` order. Panel closes. |
619
+ | `create` | `string` | The create row was clicked; payload is the typed text. |
620
+ | `search` | `string` | The search text changed (filtering is local). |
621
+ | `update:open` | `boolean` | The panel opened or closed. |
622
+
623
+ ### Accessibility
624
+
625
+ - The trigger is a `DsButton` (`outline`, `medium` / `large`) with `aria-haspopup="dialog"` /
626
+ `aria-expanded`; rows are `DsCheckbox` labels spanning the whole row; the create row is a
627
+ real button.
628
+
629
+ ### Design parity (export `tagsLine` / `tagMenu`)
630
+
631
+ - Trigger: `sell` glyph in the first tag's colour, «Tagged as {first}» and the `+N` chip in
632
+ the trailing slot; untagged: `label` glyph + "Tag". Panel 240px, rows 13px/600 with a 9px
633
+ colour dot, list capped at 200px, Apply primary on the right. Mirrored.
634
+ - Shape follows the design per context (Diego, 22/09): squared in rows and the profile (the
635
+ export's `tagsLine`), `pill` in the bulk bar where the design uses the
636
+ `DsItemSelectorButton` shape («Tag» in «Add contacts to»). The search is the same filled
637
+ grey `DsInput type="search"` the export draws — not a delta.
638
+ - Label weight **700**, the DS rule («700 for labels and emphasis», the weight of
639
+ `DsItemSelectorButton`) where the export draws 600 — a selector, not a CTA.
640
+ - **Logged deltas (accepted, pending Ariel's confirmation of the ramp):** the trigger is the
641
+ DS `DsButton outline` composed (not redrawn): the export's ring, but radius 4 vs its 6 and
642
+ the 14px token vs 13px; the `+N` here is `DsMoreCountChip` (the contract's global circular
643
+ chip, cursor inherited from the button) rather than the export's smaller filled variant;
644
+ Apply is `DsButton` medium (32px) vs 34; panel radius 6 vs 8.
645
+
646
+ ---
647
+
76
648
  <!-- DsAvatar · Core -->
77
649
 
78
650
  ## DsAvatar
@@ -1496,27 +2068,31 @@ ring and 8px of padding on top of Element Plus. Positioning is pure CSS.
1496
2068
 
1497
2069
  ### Props
1498
2070
 
1499
- | Prop | Type | Default | Description |
1500
- | ---------------- | ------------------------- | ---------- | ------------------------------------------------------------- |
1501
- | `open` | `boolean` | `false` | Visibility. Pair with `v-model:open`. |
1502
- | `placement` | `DsPopoverPlacement` (12) | `'bottom'` | Where the panel opens — see **Placement** below. |
1503
- | `width` | `string` | `''` | Panel width (any CSS length). Empty = fit content. |
1504
- | `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
1505
- | `closeOnOutside` | `boolean` | `true` | A press outside the trigger and panel requests a close. |
1506
- | `triggerOnClick` | `boolean` | `true` | Let the trigger slot toggle the panel. Off = consumer-driven. |
2071
+ | Prop | Type | Default | Description |
2072
+ | ---------------- | ------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
2073
+ | `open` | `boolean` | `false` | Visibility. Pair with `v-model:open`. |
2074
+ | `placement` | `DsPopoverPlacement` (14) | `'bottom'` | Where the panel opens — see **Placement** below. |
2075
+ | `width` | `string` | `''` | Panel width (any CSS length). Empty = fit content. |
2076
+ | `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
2077
+ | `closeOnOutside` | `boolean` | `true` | A press outside the trigger and panel requests a close. |
2078
+ | `triggerOnClick` | `boolean` | `true` | Let the trigger slot toggle the panel. Off = consumer-driven. |
2079
+ | `offset` | `string` | `''` | Moves the anchor along the trigger's cross axis (any CSS length; `%` = of the trigger box). The contact-data cell uses `'25%'`. |
2080
+ | `flush` | `boolean` | `false` | Drops the 8px card padding for content with its own rows/dividers (e.g. `DsContactList`). |
2081
+ | `teleported` | `boolean` | `false` | Renders the panel in `<body>`, so no ancestor's `overflow` clips it (a table cell, a scroller). See **Teleported** below. |
1507
2082
 
1508
2083
  ### Placement
1509
2084
 
1510
- `side` or `side-alignment`, 12 values from `DS_POPOVER_PLACEMENTS`:
2085
+ `side` or `side-alignment`, 14 values from `DS_POPOVER_PLACEMENTS`:
1511
2086
 
1512
- | Form | Where the panel goes |
1513
- | ------------------------------------- | --------------------------------------------------------------- |
1514
- | `bottom` | Below, **centred** on the trigger. |
1515
- | `bottom-start` | Below, flush with the trigger's **leading** edge (`left: 0`). |
1516
- | `bottom-end` | Below, flush with the trigger's **trailing** edge (`right: 0`). |
1517
- | `top` · `top-start` · `top-end` | Same three, above the trigger. |
1518
- | `left` · `left-start` · `left-end` | Beside it; the alignment runs on the **vertical** axis. |
1519
- | `right` · `right-start` · `right-end` | Idem, on the other side. |
2087
+ | Form | Where the panel goes |
2088
+ | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2089
+ | `bottom` | Below, **centred** on the trigger. |
2090
+ | `bottom-start` | Below, flush with the trigger's **leading** edge (`left: 0`). |
2091
+ | `bottom-end` | Below, flush with the trigger's **trailing** edge (`right: 0`). |
2092
+ | `top` · `top-start` · `top-end` | Same three, above the trigger. |
2093
+ | `left` · `left-start` · `left-end` | Beside it; the alignment runs on the **vertical** axis. |
2094
+ | `right` · `right-start` · `right-end` | Idem, on the other side. |
2095
+ | `over-start` · `over-end` | **Over** the trigger: top 8px above it, aligned to the leading / trailing edge. The contact-data cell (export `TypedCell` `top: −8`; contract §3.5 adds a ¼ `offset`). |
1520
2096
 
1521
2097
  The aligned forms are not decoration. The DS company card is
1522
2098
  `{ position: absolute, top: 'calc(100% + 6px)', left: 0 }` — i.e. **`bottom-start`**.
@@ -1530,6 +2106,20 @@ The bare sides keep their 3.1.0 meaning (centred), so this is purely additive.
1530
2106
  > suffixed form — it reads only the side — so adopting it there later is a type change,
1531
2107
  > not a rewrite.
1532
2108
 
2109
+ ### Teleported
2110
+
2111
+ By default the panel is absolutely positioned **inside** the popover's root, so any
2112
+ ancestor with `overflow` other than `visible` cuts it. That is what happened to the
2113
+ prospector's company card: its cell and the table's scroller both clip, and only the top
2114
+ edge of the card showed (SALESQL-4056). `el-popover`, which DsPopover replaced there,
2115
+ teleported to `body` by default.
2116
+
2117
+ With `teleported`, the panel renders in `<body>` inside a fixed box that mirrors the root's
2118
+ rect, re-read on scroll (any container, capture phase) and resize. Placement, `offset` and
2119
+ the viewport clamp resolve against that box exactly as against the root. Outside-press and
2120
+ Escape keep working (the panel is checked on its own). Off by default: nothing existing moves.
2121
+ `DsCompanyCard`'s «In a table cell (teleported)» variant shows it inside a clipping cell.
2122
+
1533
2123
  ### Slots
1534
2124
 
1535
2125
  | Slot | Description |