@salesql/sql_components_vue3 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/composables/useViewportClamp.d.ts +9 -2
- package/dist/constants/contact-data.d.ts +100 -0
- package/dist/constants/events.d.ts +8 -0
- package/dist/constants/pickers.d.ts +36 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.es.js +2372 -1354
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/stories/StoryStage.vue.d.ts +12 -0
- package/dist/ui/DsAddToSequence/DsAddToSequence.types.d.ts +35 -0
- package/dist/ui/DsAddToSequence/DsAddToSequence.vue.d.ts +146 -0
- package/dist/ui/DsAddToSequence/index.d.ts +2 -0
- package/dist/ui/DsButton/DsButton.types.d.ts +1 -0
- package/dist/ui/DsButton/DsButton.vue.d.ts +3 -0
- package/dist/ui/DsContactCell/DsContactCell.types.d.ts +45 -0
- package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +203 -0
- package/dist/ui/DsContactCell/index.d.ts +2 -0
- package/dist/ui/DsContactList/DsContactList.types.d.ts +26 -0
- package/dist/ui/DsContactList/DsContactList.vue.d.ts +139 -0
- package/dist/ui/DsContactList/index.d.ts +2 -0
- package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.types.d.ts +13 -0
- package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue.d.ts +41 -0
- package/dist/ui/DsDeliverabilityBadge/index.d.ts +2 -0
- package/dist/ui/DsItemSelectorButton/DsItemSelectorButton.types.d.ts +1 -1
- package/dist/ui/DsMaskedValue/DsMaskedValue.types.d.ts +9 -0
- package/dist/ui/DsMaskedValue/DsMaskedValue.vue.d.ts +32 -0
- package/dist/ui/DsMaskedValue/index.d.ts +2 -0
- package/dist/ui/DsMoreCountChip/DsMoreCountChip.types.d.ts +8 -0
- package/dist/ui/DsMoreCountChip/DsMoreCountChip.vue.d.ts +31 -0
- package/dist/ui/DsMoreCountChip/index.d.ts +2 -0
- package/dist/ui/DsPill/DsPill.types.d.ts +1 -1
- package/dist/ui/DsPopover/DsPopover.types.d.ts +35 -1
- package/dist/ui/DsPopover/DsPopover.vue.d.ts +18 -0
- package/dist/ui/DsSavedButton/DsSavedButton.types.d.ts +23 -0
- package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +135 -0
- package/dist/ui/DsSavedButton/index.d.ts +2 -0
- package/dist/ui/DsSelect/DsSelect.types.d.ts +1 -1
- package/dist/ui/DsTagPicker/DsTagPicker.types.d.ts +25 -0
- package/dist/ui/DsTagPicker/DsTagPicker.vue.d.ts +130 -0
- package/dist/ui/DsTagPicker/index.d.ts +2 -0
- package/llms-full.txt +568 -15
- package/llms.txt +8 -0
- 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.3.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
|
|
|
@@ -11,8 +11,42 @@ import '@salesql/sql_components_vue3/dist/style.css'; // once, at app entry
|
|
|
11
11
|
|
|
12
12
|
All components are named exports with the `Ds` prefix. Variant constants and TypeScript types ship alongside each component (e.g. `DS_BUTTON_VARIANTS`, `DsButtonVariant`). Components never fetch data or hold app state — drive them with props and listen to their events.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Icon font — REQUIRED in the consuming app
|
|
15
15
|
|
|
16
|
+
Components that draw an icon emit `<i class="material-symbols-filled">{ligature}</i>`. The library ships **neither the font nor that class** — a component library must not impose a global baseline (see SALESQL-3454). The app MUST provide both, or every glyph renders as its own ligature name (a literal `close` instead of ✕).
|
|
17
|
+
|
|
18
|
+
1. Load the font, e.g. in `index.html`:
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0..1,0" />
|
|
22
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0..1,0" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
2. Define the object class globally:
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
.material-symbols-filled {
|
|
29
|
+
font-family: 'Material Symbols Rounded';
|
|
30
|
+
font-weight: normal;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-size: 20px;
|
|
33
|
+
line-height: 20px;
|
|
34
|
+
font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
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
|
+
|
|
40
|
+
## Components (40)
|
|
41
|
+
|
|
42
|
+
- **DsAddToSequence** (Contact data) — The canonical "Add to sequence" control: a trigger and a panel with the **SEND TO** choice
|
|
43
|
+
- **DsContactCell** (Contact data) — The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
|
|
44
|
+
- **DsContactList** (Contact data) — The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
|
|
45
|
+
- **DsDeliverabilityBadge** (Contact data) — The contract's **single** verification badge (§3.3, «modelo Lusha»): a bare green `A+`
|
|
46
|
+
- **DsMaskedValue** (Contact data) — An email or phone string rendered **verbatim**, with the contract's two-tone treatment when
|
|
47
|
+
- **DsMoreCountChip** (Contact data) — The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
|
|
48
|
+
- **DsSavedButton** (Contact data) — **The** one canonical "Saved" control (Ari: identical everywhere — rows, drawers, bulk bars).
|
|
49
|
+
- **DsTagPicker** (Contact data) — The canonical "Tag" control («Tagged as X +N», Lusha style). Reads as a **Tag** button until
|
|
16
50
|
- **DsAvatar** (Core) — Contact/user avatar: an image, generated initials with a deterministic color hash, or an
|
|
17
51
|
- **DsBadge** (Core) — Solid, white-text pill for value types and counts (e.g. "Work", "New"). **Presentational
|
|
18
52
|
- **DsButton** (Core) — Standard clickable control with the DS variant/size vocabulary, plus icon-only
|
|
@@ -47,6 +81,498 @@ All components are named exports with the `Ds` prefix. Variant constants and Typ
|
|
|
47
81
|
- **DsPopover** (Overlays) — Click-triggered card panel anchored to a trigger. Built **native** — no `element-plus`,
|
|
48
82
|
|
|
49
83
|
---
|
|
84
|
+
<!-- DsAddToSequence · Contact data -->
|
|
85
|
+
|
|
86
|
+
## DsAddToSequence
|
|
87
|
+
|
|
88
|
+
The canonical "Add to sequence" control: a trigger and a panel with the **SEND TO** choice
|
|
89
|
+
(Work / Direct email as stacked radio cards), a searchable multi-select of campaigns and an
|
|
90
|
+
**Add** confirm that stays disabled until something is selected. Measured from the design
|
|
91
|
+
export's `SequenceButton` / `sequenceMenu`. One affordance for the full profile and the
|
|
92
|
+
bulk bars — the trigger switches look with `variant` and `size`.
|
|
93
|
+
|
|
94
|
+
The library knows nothing about campaigns or sending: it renders the list you pass and
|
|
95
|
+
emits the intent.
|
|
96
|
+
|
|
97
|
+
### Props
|
|
98
|
+
|
|
99
|
+
| Prop | Type | Default | Description |
|
|
100
|
+
| ------------------- | --------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
101
|
+
| `label` | `string` | — | Trigger label (required). |
|
|
102
|
+
| `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. |
|
|
103
|
+
| `channelsLabel` | `string` | — | Caption above the radios ("Send to") (required). |
|
|
104
|
+
| `channels` | `DsSequenceChannelOption[]` | — | `{ value: 'work' \| 'direct', label }` — the app passes the labels (required). |
|
|
105
|
+
| `defaultChannel` | `'work' \| 'direct'` | `'work'` | Initially selected channel. |
|
|
106
|
+
| `campaignsLabel` | `string` | `''` | Caption above the list ("Recent campaigns"). Empty = none. |
|
|
107
|
+
| `campaigns` | `DsPickerOption[]` | — | The campaigns to offer (required). |
|
|
108
|
+
| `searchPlaceholder` | `string` | `''` | |
|
|
109
|
+
| `emptyLabel` | `string` | `''` | Shown when the search matches nothing. |
|
|
110
|
+
| `addLabel` | `string` | — | The confirm (required). |
|
|
111
|
+
| `variant` | `'secondary' \| 'primary'` | `'secondary'` | `DsButton outline` (white, hairline ring) or `DsButton primary` (solid accent). |
|
|
112
|
+
| `size` | `'medium' \| 'large'` | `'medium'` | 32px / 36px trigger. |
|
|
113
|
+
| `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) — the bulk-bar look beside `DsItemSelectorButton`. |
|
|
114
|
+
| `align` | `'start' \| 'end'` | `'end'` | Which trigger edge the 288px panel hangs from. |
|
|
115
|
+
| `disabled` | `boolean` | `false` | |
|
|
116
|
+
|
|
117
|
+
### Events
|
|
118
|
+
|
|
119
|
+
| Event | Payload | When |
|
|
120
|
+
| ------------- | -------------------------------------------------------------- | --------------------------------------------- |
|
|
121
|
+
| `add` | `{ channel: 'work' \| 'direct', campaigns: DsPickerOption[] }` | Add clicked. Panel closes, selection resets. |
|
|
122
|
+
| `search` | `string` | The search text changed (filtering is local). |
|
|
123
|
+
| `update:open` | `boolean` | The panel opened or closed. |
|
|
124
|
+
|
|
125
|
+
### Accessibility
|
|
126
|
+
|
|
127
|
+
- The trigger is a `DsButton` (`outline` / `primary`, `medium` / `large`) with
|
|
128
|
+
`aria-haspopup="dialog"` / `aria-expanded`; the channels are a native radio group
|
|
129
|
+
(`DsRadio`, one `name` per instance); campaigns are `DsCheckbox` rows.
|
|
130
|
+
- `Add` is a real disabled `DsButton` until a campaign is selected.
|
|
131
|
+
|
|
132
|
+
### Design parity (export `SequenceButton`)
|
|
133
|
+
|
|
134
|
+
- Trigger: `send` glyph 16px + label; `secondary` is `DsButton outline` (white, hairline
|
|
135
|
+
ring — the export's), `primary` is `DsButton primary` (solid accent). Channel cards
|
|
136
|
+
`8px 12px`, radius 6, accent ring + tint when chosen. Panel 288px, list capped at 176px.
|
|
137
|
+
Mirrored.
|
|
138
|
+
- The search is the same filled grey `DsInput type="search"` the export draws — not a delta.
|
|
139
|
+
- **Logged deltas (accepted, Diego 22/09):** the trigger is the DS button composed (not
|
|
140
|
+
redrawn): **radius 4** vs the export's 6 (`pill` = fully round, for bulk bars), DS 14px/500
|
|
141
|
+
label vs 13.5px/700; trigger height 40px → `large` (36px) / default `medium` (32px); Add is
|
|
142
|
+
`DsButton` medium (32) vs 34; section captions 10.5px → `micro` (10px) in `slate-soft`
|
|
143
|
+
(`#5e666f`) vs the export's `#5c6670`; panel radius 6 vs 8.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
<!-- DsContactCell · Contact data -->
|
|
148
|
+
|
|
149
|
+
## DsContactCell
|
|
150
|
+
|
|
151
|
+
The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
|
|
152
|
+
badge when it applies, the `+N` overflow chip, and a popover listing the whole group.
|
|
153
|
+
With `type` set it is also the **full-profile row** (type glyph on the left, §3.2).
|
|
154
|
+
|
|
155
|
+
### Behaviour — hover opens, click pins, ESC closes
|
|
156
|
+
|
|
157
|
+
- **Hover** anywhere on the cell opens the popover (1 or N items, revealed or not) and emits
|
|
158
|
+
`update:open(true)` — lazy-load the group there if you need to.
|
|
159
|
+
- **Leaving** closes after `leaveDelay` (220 ms) unless pinned. Re-entering cancels.
|
|
160
|
+
- **Click** on the value pins it (leaving no longer closes); a second click releases.
|
|
161
|
+
- **ESC** (anywhere in the document) and a **click outside** close and un-pin.
|
|
162
|
+
- The popover opens **over the cell** (its top 8px above the trigger, like the export's
|
|
163
|
+
`TypedCell`), **start-aligned and shifted ¼ of the cell's width**, so the leading quarter of
|
|
164
|
+
the column stays free and it can be swept downward without the panel intercepting the
|
|
165
|
+
pointer. «Una lista se puede escanear sin clicks.» (contract §3.5)
|
|
166
|
+
- `disabled` removes the popover entirely — `+N` stays plain text (contract §3.10, class B1).
|
|
167
|
+
|
|
168
|
+
### Props
|
|
169
|
+
|
|
170
|
+
| Prop | Type | Default | Description |
|
|
171
|
+
| ------------------------------ | -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
172
|
+
| `items` | `DsContactItem[]` | — | The group, **primary first**; `items[0]` is what the cell shows (required). |
|
|
173
|
+
| `count` | `number \| null` | `null` | Group size the chip subtracts from (`+N` = count − 1). Server count when it exists; else `items.length`. |
|
|
174
|
+
| `sections` | `DsContactSection[]` | `[]` | Unified columns (Emails: Work + Direct; Phones: Direct + HQ): the popover bands each type, one total. `items` still drives the cell. |
|
|
175
|
+
| `kind` | `'email' \| 'phone'` | — | Masked split rule; badge eligibility (required). |
|
|
176
|
+
| `type` | `DsContactType` | `''` | Full-profile row: draws the type glyph. Table cells omit it (the header names the type). |
|
|
177
|
+
| `label` | `string` | — | The popover variant name ("Work emails"). App copy (required). |
|
|
178
|
+
| `badgeLabel` | `string` | — | `A_PLUS_BADGE` (required). |
|
|
179
|
+
| `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
|
|
180
|
+
| `moreLabel` | `string` | `''` | Accessible name for the `+N` chip ("2 more emails"). |
|
|
181
|
+
| `emptyLabel` | `string` | `'—'` | Rendered when `items` is empty (a typographic dash, not copy). |
|
|
182
|
+
| `showRate` | `boolean` | `false` | Thumbs up / down in the popover rows. |
|
|
183
|
+
| `disabled` | `boolean` | `false` | No popover at all. |
|
|
184
|
+
| `placement` | `DsPopoverPlacement` | `'over-start'` | Popover side / alignment. `over-start` covers the cell like the export; `bottom-start` opens below it. |
|
|
185
|
+
| `offset` | `string` | `'25%'` | Popover anchor shift along the cell (the contract's ¼). |
|
|
186
|
+
| `popoverWidth` | `string` | `'300px'` | Popover width (export `DataPopover`). |
|
|
187
|
+
| `leaveDelay` | `number` | `220` | Grace before an unpinned popover closes after the pointer leaves (ms). |
|
|
188
|
+
| `copyLabel` … `incorrectLabel` | `string` | English | Accessible labels forwarded to the list's icon-only actions. |
|
|
189
|
+
|
|
190
|
+
### Events
|
|
191
|
+
|
|
192
|
+
| Event | Payload | When |
|
|
193
|
+
| ------------- | --------------- | -------------------------------------------------------- |
|
|
194
|
+
| `update:open` | `boolean` | The popover opened or closed (hover, pin, ESC, outside). |
|
|
195
|
+
| `copy` | `DsContactItem` | A row's value was copied (re-emitted from the list). |
|
|
196
|
+
| `correct` | `DsContactItem` | Thumbs-up on a row. |
|
|
197
|
+
| `incorrect` | `DsContactItem` | Thumbs-down on a row. |
|
|
198
|
+
|
|
199
|
+
### Slots
|
|
200
|
+
|
|
201
|
+
| Slot | Where | Use |
|
|
202
|
+
| --------- | ---------------------------------- | -------------------------------------- |
|
|
203
|
+
| `actions` | Right side of the popover's header | The app's Show details / Edit control. |
|
|
204
|
+
|
|
205
|
+
### Feeding it from the app's view model
|
|
206
|
+
|
|
207
|
+
The cell classifies nothing. The consumer passes one **bucket** and adapts each item to
|
|
208
|
+
`DsContactItem` — one line per field:
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
// legacy view model (contract §3.8) // typed contact_data block (§3.11), tomorrow
|
|
212
|
+
const toItem = (it) => ({ const toItem = (it) => ({
|
|
213
|
+
id: it.id, id: it.uid,
|
|
214
|
+
value: it.value, value: it.is_revealed ? it.value : it.preview,
|
|
215
|
+
masked: it.isMasked, masked: !it.is_revealed,
|
|
216
|
+
valid: it.status === 'valid', valid: it.verification === 'valid',
|
|
217
|
+
primary: it.isPrimary, primary: it.is_primary,
|
|
218
|
+
}); });
|
|
219
|
+
|
|
220
|
+
// Work email column → items = vm.workEmails.map(toItem), count = vm.counts.work
|
|
221
|
+
// Direct phone column (legacy shape) → items = [vm.mobilePhones[0] || vm.directPhones[0], ...rest].map(toItem)
|
|
222
|
+
// count = mobile + direct — NEVER vm.counts.phones (it includes HQ)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Labels and badge strings come from the app's `contact-data-contract/contactDataCopy.js`
|
|
226
|
+
(`COLUMN_LABEL`, `TYPE_LABEL`, `A_PLUS_BADGE`, `A_PLUS_TOOLTIP`).
|
|
227
|
+
|
|
228
|
+
### Accessibility
|
|
229
|
+
|
|
230
|
+
- The trigger is a real `<button>` with `aria-haspopup="dialog"` and `aria-expanded`; the
|
|
231
|
+
popover panel is a focusable `role="dialog"` (from `DsPopover`).
|
|
232
|
+
- The badge inside the trigger is **not** a tab stop (`focusable="false"`): nested
|
|
233
|
+
focusables inside a button are invalid, and the popover carries the same information.
|
|
234
|
+
|
|
235
|
+
### Design parity (export `TypedCell` / `usePop`)
|
|
236
|
+
|
|
237
|
+
- Trigger 30px, gap 10, `0 8px` padding bleeding `−8px` into the cell, radius 6, open →
|
|
238
|
+
accent-bg. Value 14px in `$contact-data-value-ink` at `$contact-data-value-weight`.
|
|
239
|
+
Leave grace 220 ms, click pins, ESC / outside close — mirrored 1:1.
|
|
240
|
+
- The panel sits _over_ the trigger (`top: −8`) exactly like the export: `DsPopover` gained
|
|
241
|
+
`over-start` / `over-end` for it (Diego, 22/09). The ¼ shift is the contract's (§3.5), not
|
|
242
|
+
the export's.
|
|
243
|
+
- **Logged deltas (accepted):** popover chrome is `DsPopover`'s (radius 6, dropdown shadow)
|
|
244
|
+
rather than the export's (radius 8, deeper shadow). Type glyph 17px → `icon-size(16)`.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
<!-- DsContactList · Contact data -->
|
|
249
|
+
|
|
250
|
+
## DsContactList
|
|
251
|
+
|
|
252
|
+
The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
|
|
253
|
+
Direct phones, HQ) or a full-profile block. Each row: type glyph · value (two-tone when
|
|
254
|
+
masked) · `A+` on valid emails · copy / rate as a hover overlay. Contract §3.2, §3.3, §3.5,
|
|
255
|
+
§3.7; measured from the design export's `PopItem` / `DataPopover`.
|
|
256
|
+
|
|
257
|
+
One group, one type — or, with `sections`, the export's unified Emails / Phones popover: a
|
|
258
|
+
quiet uppercase band per type («WORK (2)»), its rows under it, and one total in the header.
|
|
259
|
+
|
|
260
|
+
### Props
|
|
261
|
+
|
|
262
|
+
| Prop | Type | Default | Description |
|
|
263
|
+
| ---------------- | -------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
264
|
+
| `items` | `DsContactItem[]` | `[]` | The group, primary first, as the view model delivers it. Never reordered. Omit when `sections` drive the rows. |
|
|
265
|
+
| `sections` | `DsContactSection[]` | `[]` | Unified variants: `{ type, label, items }` per type → a band + its rows; empty types are skipped. |
|
|
266
|
+
| `kind` | `'email' \| 'phone'` | — | Masked split rule, and whether a badge may ever render (required). |
|
|
267
|
+
| `type` | `DsContactType` | `''` | `work` · `direct` · `mobile` · `hq` · `other` → the left glyph. Omit for none. |
|
|
268
|
+
| `title` | `string` | `''` | Variant name in the header ("Work emails"). The total `(N)` is appended. App copy. |
|
|
269
|
+
| `badgeLabel` | `string` | — | `A_PLUS_BADGE` — rendered only on valid emails (required). |
|
|
270
|
+
| `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
|
|
271
|
+
| `showRate` | `boolean` | `false` | Adds thumbs up / down to unmasked rows. |
|
|
272
|
+
| `emptyLabel` | `string` | `''` | Shown when `items` is empty. Omit to render nothing. |
|
|
273
|
+
| `copyLabel` | `string` | `'Copy'` | Accessible label / title of the copy button. |
|
|
274
|
+
| `copiedLabel` | `string` | `'Copied!'` | Shown for ~1.2 s after a copy. |
|
|
275
|
+
| `correctLabel` | `string` | `'Correct'` | Accessible label of thumbs-up. |
|
|
276
|
+
| `incorrectLabel` | `string` | `'Incorrect'` | Accessible label of thumbs-down. |
|
|
277
|
+
|
|
278
|
+
`DsContactItem` is `{ id, value, masked, valid, primary, rating? }` — see `DsContactCell`
|
|
279
|
+
for the mapping from the app's view model.
|
|
280
|
+
|
|
281
|
+
### Events
|
|
282
|
+
|
|
283
|
+
| Event | Payload | When |
|
|
284
|
+
| ----------- | --------------- | -------------------------------------------- |
|
|
285
|
+
| `copy` | `DsContactItem` | The row's value was copied to the clipboard. |
|
|
286
|
+
| `correct` | `DsContactItem` | Thumbs-up clicked (`showRate`). |
|
|
287
|
+
| `incorrect` | `DsContactItem` | Thumbs-down clicked (`showRate`). |
|
|
288
|
+
|
|
289
|
+
### Slots
|
|
290
|
+
|
|
291
|
+
| Slot | Where | Use |
|
|
292
|
+
| --------- | ------------------------ | ------------------------------------------------------------------- |
|
|
293
|
+
| `actions` | Right side of the header | The app's Show / Edit control. The list knows nothing about reveal. |
|
|
294
|
+
|
|
295
|
+
### Rules it enforces
|
|
296
|
+
|
|
297
|
+
- **Badge** = `kind === 'email' && item.valid`. Phones never; masked valid emails yes.
|
|
298
|
+
- **Masked rows have no actions** — there is no full value to copy or judge.
|
|
299
|
+
- **Keys** are `item.id`, falling back to the value. Never the index.
|
|
300
|
+
|
|
301
|
+
### Accessibility
|
|
302
|
+
|
|
303
|
+
- `role="list"` on the rows; icon-only actions carry `aria-label` + `title`; rating buttons
|
|
304
|
+
expose `aria-pressed` from `item.rating`.
|
|
305
|
+
- The overlay is visible on `:hover` **and** `:focus-within`, so keyboard users reach copy /
|
|
306
|
+
rate too. The type glyph is `aria-hidden` (the header names the type).
|
|
307
|
+
|
|
308
|
+
### Design parity (export `PopItem` / `DataPopover`)
|
|
309
|
+
|
|
310
|
+
- Row `7px 12px`, 1px tint divider, 16px type glyph, value 13px in `$contact-data-value-ink`
|
|
311
|
+
at `$contact-data-value-weight` (the contract's inverted hierarchy — the export's 600 /
|
|
312
|
+
`#1F2933` is overruled by the contract, which is newer). Header 12.5px/600 in
|
|
313
|
+
`$contact-data-header-ink` → `small` (13px).
|
|
314
|
+
- **Logged deltas:** row hover `#FCFCFD` → `$contact-data-row-hover` (`#F9F9F9`, the only
|
|
315
|
+
frozen hover); action glyph 15px → `icon-size(16)`; header 12.5px → 13px.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
<!-- DsDeliverabilityBadge · Contact data -->
|
|
320
|
+
|
|
321
|
+
## DsDeliverabilityBadge
|
|
322
|
+
|
|
323
|
+
The contract's **single** verification badge (§3.3, «modelo Lusha»): a bare green `A+`
|
|
324
|
+
superscript with the tooltip that carries its meaning. Valid / Unverifiable / accept-all /
|
|
325
|
+
last-verified badges were retired on 2026-07-09 — nothing else renders.
|
|
326
|
+
|
|
327
|
+
**It does not decide whether to show.** The rule is the composer's and it is one line:
|
|
328
|
+
`valid && kind === 'email'`. Phones never carry verification, whatever their status; a
|
|
329
|
+
masked preview that is valid still gets the badge.
|
|
330
|
+
|
|
331
|
+
### Props
|
|
332
|
+
|
|
333
|
+
| Prop | Type | Default | Description |
|
|
334
|
+
| ----------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------- |
|
|
335
|
+
| `label` | `string` | — | The glyph text. The app passes the contract's `A_PLUS_BADGE` (required). |
|
|
336
|
+
| `tooltip` | `string` | — | The meaning — `A_PLUS_TOOLTIP` — shown on hover/focus; also the accessible name (required). |
|
|
337
|
+
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Tooltip side. |
|
|
338
|
+
| `focusable` | `boolean` | `true` | Standalone, the glyph is a tab stop. Inside a focusable trigger pass `false`. |
|
|
339
|
+
|
|
340
|
+
### Accessibility
|
|
341
|
+
|
|
342
|
+
- The glyph is `role="img"` with `aria-label` = `tooltip`, so a screen reader announces the
|
|
343
|
+
meaning rather than two letters.
|
|
344
|
+
- Standalone it is keyboard-reachable (`tabindex="0"`) and the tooltip opens on focus.
|
|
345
|
+
- **Known gap, recorded by the contract:** `#2E9E6E` on white is 3.37:1 at 9px, below the
|
|
346
|
+
4.5:1 AA floor. It is frozen because three surfaces must match; raising it is a design
|
|
347
|
+
decision (contract OPEN list).
|
|
348
|
+
|
|
349
|
+
### Design parity (export `QualityBadge`)
|
|
350
|
+
|
|
351
|
+
9px / 800 / 0.2px tracking, no box, `align-self: flex-start; margin-top: -2px; flex: none`,
|
|
352
|
+
colour `$contact-data-badge-a-plus-ink`. Mirrored 1:1 from the contract partial.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
<!-- DsMaskedValue · Contact data -->
|
|
357
|
+
|
|
358
|
+
## DsMaskedValue
|
|
359
|
+
|
|
360
|
+
An email or phone string rendered **verbatim**, with the contract's two-tone treatment when
|
|
361
|
+
the **server** masked it (§3.7): the redacted part in the mask tone, the visible part —
|
|
362
|
+
domain, country prefix — in the inherited ink. It never masks anything itself. _The front
|
|
363
|
+
is never what obfuscates a value we sell_: to mask, it would have to hold the full value,
|
|
364
|
+
and holding it is the leak.
|
|
365
|
+
|
|
366
|
+
### Props
|
|
367
|
+
|
|
368
|
+
| Prop | Type | Default | Description |
|
|
369
|
+
| -------- | -------------------- | ------- | ---------------------------------------------------------------------- |
|
|
370
|
+
| `value` | `string` | — | The string exactly as the API sent it — masked preview or full value. |
|
|
371
|
+
| `kind` | `'email' \| 'phone'` | — | Split rule: whole local part for emails, glyph runs for phones. |
|
|
372
|
+
| `masked` | `boolean` | `false` | `true` when `value` is the server's masked form. Off = one plain span. |
|
|
373
|
+
|
|
374
|
+
The consumer decides `masked`: `isMasked` on the legacy view model, `!is_revealed` on the
|
|
375
|
+
typed block. Shape detection is never applied here.
|
|
376
|
+
|
|
377
|
+
### Split rules (`splitMaskedValue`, exported)
|
|
378
|
+
|
|
379
|
+
- **Email** — the local part is the redaction (`***`, `...`, `•••`); no `@` → all masked.
|
|
380
|
+
- **Phone** — every run of `*` / `•` / `.` is a redaction; a **single** dot is a real
|
|
381
|
+
separator (`+1.415.555.0100`). No prefix is assumed (`8008...` ships with none).
|
|
382
|
+
- Concatenating the segments always yields the input. Nothing is re-grouped.
|
|
383
|
+
|
|
384
|
+
### Design parity
|
|
385
|
+
|
|
386
|
+
- Mask tone `$contact-data-mask-ink` (#b6bbc0) from the contract partial; the redacted run is
|
|
387
|
+
bold and letter-spaced 1px like the export's `DOTS`. Asterisk runs are pulled down
|
|
388
|
+
(`vertical-align: -0.16em`) because Mulish draws `*` at cap height — without it the stars
|
|
389
|
+
float above the domain. A redaction that follows a visible prefix gets a 2px margin (the
|
|
390
|
+
export's `{tail} {dots}` gap) instead of an inserted space, so the text stays verbatim.
|
|
391
|
+
- `title` exposes the full value only when unmasked (the export does the same).
|
|
392
|
+
|
|
393
|
+
### When to use
|
|
394
|
+
|
|
395
|
+
Inside `DsContactCell` and `DsContactList`, or anywhere a contact-data value is printed on
|
|
396
|
+
its own with the contract's masked treatment.
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
<!-- DsMoreCountChip · Contact data -->
|
|
401
|
+
|
|
402
|
+
## DsMoreCountChip
|
|
403
|
+
|
|
404
|
+
The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
|
|
405
|
+
**N is the overflow, not the group size**, and `+0` never renders. Compute the overflow
|
|
406
|
+
with `overflowFromGroupSize(groupSize)` — never subtract by hand, and never feed it the
|
|
407
|
+
aggregate phone count that includes HQ.
|
|
408
|
+
|
|
409
|
+
### Props
|
|
410
|
+
|
|
411
|
+
| Prop | Type | Default | Description |
|
|
412
|
+
| ---------- | --------- | ------- | ----------------------------------------------------------------------------- |
|
|
413
|
+
| `overflow` | `number` | — | Items beyond the one shown. `<= 0` renders nothing (required). |
|
|
414
|
+
| `active` | `boolean` | `false` | Accent state while the owning cell's popover is open. |
|
|
415
|
+
| `label` | `string` | `''` | Accessible name when `+N` alone lacks context ("2 more emails"). App wording. |
|
|
416
|
+
|
|
417
|
+
### Events
|
|
418
|
+
|
|
419
|
+
None. Purely presentational; the hover / pin behaviour belongs to `DsContactCell`.
|
|
420
|
+
|
|
421
|
+
### Design parity (export `MoreChip`)
|
|
422
|
+
|
|
423
|
+
- 22 × 20 min box, `0 6px` padding, fully round, 1px ring; rest = white / tint ring /
|
|
424
|
+
muted ink, active = accent-bg / accent-mid ring / accent ink. Mirrored 1:1.
|
|
425
|
+
- **Logged delta:** the export sets 11px; the type scale has no 11 step, so `caption`
|
|
426
|
+
(12px) is used. To be settled in the parity pass.
|
|
427
|
+
|
|
428
|
+
### When to use
|
|
429
|
+
|
|
430
|
+
Only inside `DsContactCell` / `DsContactList` compositions. It is not a generic counter.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
<!-- DsSavedButton · Contact data -->
|
|
435
|
+
|
|
436
|
+
## DsSavedButton
|
|
437
|
+
|
|
438
|
+
**The** one canonical "Saved" control (Ari: identical everywhere — rows, drawers, bulk bars).
|
|
439
|
+
A folder-tinted glyph, a neutral label and a caret; the folder **name** lives in the tooltip,
|
|
440
|
+
never in the label; click opens the folder picker to re-file. Measured from the design
|
|
441
|
+
export's `SavedButton` / `FolderMenu`.
|
|
442
|
+
|
|
443
|
+
Folder CRUD stays in the app: the footer only tells you the user wants a new one.
|
|
444
|
+
|
|
445
|
+
### Props
|
|
446
|
+
|
|
447
|
+
| Prop | Type | Default | Description |
|
|
448
|
+
| ------------------- | ------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
449
|
+
| `label` | `string` | — | Neutral label — "Saved", or "Save" before the first save (required). |
|
|
450
|
+
| `tooltip` | `string` | `''` | "Saved in {folder} · change folder". Empty = no tooltip. Hides while the picker is open. |
|
|
451
|
+
| `folder` | `DsPickerOption \| null` | `null` | The current folder; tints the glyph. `null` = no glyph. |
|
|
452
|
+
| `folders` | `DsPickerOption[]` | — | Every folder the user can pick (required). |
|
|
453
|
+
| `searchPlaceholder` | `string` | `''` | |
|
|
454
|
+
| `emptyLabel` | `string` | `''` | Shown when the search matches nothing. |
|
|
455
|
+
| `createLabel` | `string` | `''` | Footer action ("New Folder"). Empty and no `footer` slot = no footer. |
|
|
456
|
+
| `icon` | `string` | `'folder'` | Material Symbols ligature for the folder glyph. |
|
|
457
|
+
| `size` | `'medium' \| 'large'` | `'medium'` | 32px for rows / profile, 36px for action and bulk bars. |
|
|
458
|
+
| `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Add contacts to»). Off = the design's table / profile trigger. |
|
|
459
|
+
| `align` | `'start' \| 'end'` | `'end'` | Which trigger edge the 300px panel hangs from. |
|
|
460
|
+
| `disabled` | `boolean` | `false` | |
|
|
461
|
+
|
|
462
|
+
`DsPickerOption` is `{ id, name, color? }` — map frontend-app's `Folder` with
|
|
463
|
+
`{ id: f.uuid, name: f.name, color: f.color }`.
|
|
464
|
+
|
|
465
|
+
### Events
|
|
466
|
+
|
|
467
|
+
| Event | Payload | When |
|
|
468
|
+
| ------------- | ---------------- | --------------------------------------------------------------- |
|
|
469
|
+
| `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here. |
|
|
470
|
+
| `create` | `string` | "New Folder" clicked; payload is the search text typed so far. |
|
|
471
|
+
| `search` | `string` | The search text changed (filtering is local). |
|
|
472
|
+
| `update:open` | `boolean` | The panel opened or closed. |
|
|
473
|
+
|
|
474
|
+
### Slots
|
|
475
|
+
|
|
476
|
+
| Slot | Scope | Use |
|
|
477
|
+
| -------- | ------------------- | ----------------------------------------------------- |
|
|
478
|
+
| `footer` | `{ query: string }` | Replace the create button with the app's own control. |
|
|
479
|
+
|
|
480
|
+
### Accessibility
|
|
481
|
+
|
|
482
|
+
- The trigger is a `DsButton` (`outline`, `medium` / `large`) — a real `<button>` with
|
|
483
|
+
`aria-haspopup="listbox"` / `aria-expanded`, and the DS focus ring, hover and disabled
|
|
484
|
+
states for free; the folder list is a native radio group (`DsRadio`, one `name` per
|
|
485
|
+
instance), so arrow keys move the selection.
|
|
486
|
+
- The whole row is the radio's label: any click on it picks.
|
|
487
|
+
|
|
488
|
+
### Design parity (export `SavedButton` / `FolderMenu`)
|
|
489
|
+
|
|
490
|
+
- Trigger: folder-tinted glyph 16px, neutral label, caret 14px muted, 32px / 36px. Rows
|
|
491
|
+
40px with the folder glyph at 20px in its colour; current row accent-bg. Panel 300px; list
|
|
492
|
+
capped at 216px. Mirrored.
|
|
493
|
+
- Shape follows the design per context (Diego, 22/09): squared in table rows and the profile
|
|
494
|
+
(the export's `SavedButton`), `pill` in the bulk bar where the design uses the
|
|
495
|
+
`DsItemSelectorButton` shape («Add contacts to»). The search is the same filled grey
|
|
496
|
+
`DsInput type="search"` the export draws — not a delta.
|
|
497
|
+
- Label weight **700**, the export's and the DS rule («700 for labels and emphasis», the weight
|
|
498
|
+
of `DsItemSelectorButton`) — a selector, not a CTA.
|
|
499
|
+
- **Logged deltas (accepted, pending Ariel's confirmation of the ramp):** the trigger is the
|
|
500
|
+
DS `DsButton outline` composed (not redrawn): the export's hairline ring, but radius 4 vs its
|
|
501
|
+
6 and the 14px token vs 12.5px; folder glyph 15px → 16; panel chrome is `DsPopover`'s
|
|
502
|
+
(radius 6) rather than the export's radius 8. The per-row Edit / Delete menu and the create
|
|
503
|
+
form are app flows, not library UI.
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
<!-- DsTagPicker · Contact data -->
|
|
508
|
+
|
|
509
|
+
## DsTagPicker
|
|
510
|
+
|
|
511
|
+
The canonical "Tag" control («Tagged as X +N», Lusha style). Reads as a **Tag** button until
|
|
512
|
+
tags are applied, then as **Tagged as {first}** with the overflow chip; the picker has
|
|
513
|
+
search, checkbox rows with a colour dot, a create affordance and an **Apply** footer.
|
|
514
|
+
Measured from the design export's `tagBtn` / `tagsLine` / `tagMenu`.
|
|
515
|
+
|
|
516
|
+
Named `DsTagPicker`, not `DsTag`: `DsTag` is already the DS outlined chip.
|
|
517
|
+
|
|
518
|
+
**Selection is a working copy.** Toggling checkboxes changes nothing outside the panel;
|
|
519
|
+
`apply` fires once, with the final list. Closing without Apply discards.
|
|
520
|
+
|
|
521
|
+
### Props
|
|
522
|
+
|
|
523
|
+
| Prop | Type | Default | Description |
|
|
524
|
+
| ------------------- | --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
525
|
+
| `label` | `string` | — | Trigger label while untagged ("Tag") (required). |
|
|
526
|
+
| `taggedAsLabel` | `string` | — | Prefix once tagged ("Tagged as") — the first tag's name follows (required). |
|
|
527
|
+
| `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
|
|
528
|
+
| `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
|
|
529
|
+
| `applyLabel` | `string` | — | The footer confirm (required). |
|
|
530
|
+
| `searchPlaceholder` | `string` | `''` | |
|
|
531
|
+
| `emptyLabel` | `string` | `''` | Shown when nothing matches and nothing can be created. |
|
|
532
|
+
| `createLabel` | `string` | `''` | Prefix of the create row («Create “{query}”»). Empty = no create row. |
|
|
533
|
+
| `moreLabel` | `string` | `''` | Accessible name for the `+N` chip. |
|
|
534
|
+
| `size` | `'medium' \| 'large'` | `'medium'` | |
|
|
535
|
+
| `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
|
|
536
|
+
| `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
|
|
537
|
+
| `disabled` | `boolean` | `false` | |
|
|
538
|
+
|
|
539
|
+
Map frontend-app's `Tag` with `{ id: t.id, name: t.name, color: t.color }` — the API takes
|
|
540
|
+
tags by numeric `id` (`projects_ids`), unlike folders.
|
|
541
|
+
|
|
542
|
+
### Events
|
|
543
|
+
|
|
544
|
+
| Event | Payload | When |
|
|
545
|
+
| ------------- | ------------------ | ------------------------------------------------------------------------ |
|
|
546
|
+
| `apply` | `DsPickerOption[]` | Apply clicked: the full new selection, in `options` order. Panel closes. |
|
|
547
|
+
| `create` | `string` | The create row was clicked; payload is the typed text. |
|
|
548
|
+
| `search` | `string` | The search text changed (filtering is local). |
|
|
549
|
+
| `update:open` | `boolean` | The panel opened or closed. |
|
|
550
|
+
|
|
551
|
+
### Accessibility
|
|
552
|
+
|
|
553
|
+
- The trigger is a `DsButton` (`outline`, `medium` / `large`) with `aria-haspopup="dialog"` /
|
|
554
|
+
`aria-expanded`; rows are `DsCheckbox` labels spanning the whole row; the create row is a
|
|
555
|
+
real button.
|
|
556
|
+
|
|
557
|
+
### Design parity (export `tagsLine` / `tagMenu`)
|
|
558
|
+
|
|
559
|
+
- Trigger: `sell` glyph in the first tag's colour, «Tagged as {first}» and the `+N` chip in
|
|
560
|
+
the trailing slot; untagged: `label` glyph + "Tag". Panel 240px, rows 13px/600 with a 9px
|
|
561
|
+
colour dot, list capped at 200px, Apply primary on the right. Mirrored.
|
|
562
|
+
- Shape follows the design per context (Diego, 22/09): squared in rows and the profile (the
|
|
563
|
+
export's `tagsLine`), `pill` in the bulk bar where the design uses the
|
|
564
|
+
`DsItemSelectorButton` shape («Tag» in «Add contacts to»). The search is the same filled
|
|
565
|
+
grey `DsInput type="search"` the export draws — not a delta.
|
|
566
|
+
- Label weight **700**, the DS rule («700 for labels and emphasis», the weight of
|
|
567
|
+
`DsItemSelectorButton`) where the export draws 600 — a selector, not a CTA.
|
|
568
|
+
- **Logged deltas (accepted, pending Ariel's confirmation of the ramp):** the trigger is the
|
|
569
|
+
DS `DsButton outline` composed (not redrawn): the export's ring, but radius 4 vs its 6 and
|
|
570
|
+
the 14px token vs 13px; the `+N` here is `DsMoreCountChip` (the contract's global circular
|
|
571
|
+
chip, cursor inherited from the button) rather than the export's smaller filled variant;
|
|
572
|
+
Apply is `DsButton` medium (32px) vs 34; panel radius 6 vs 8.
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
50
576
|
<!-- DsAvatar · Core -->
|
|
51
577
|
|
|
52
578
|
## DsAvatar
|
|
@@ -519,7 +1045,7 @@ label via the default slot, intent out via `click`.
|
|
|
519
1045
|
|
|
520
1046
|
| Prop | Type | Default | Description |
|
|
521
1047
|
| ------------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
522
|
-
| `icon` | `string` | `''` | Material
|
|
1048
|
+
| `icon` | `string` | `''` | Material Symbols ligature name; when set, renders a trailing icon button. |
|
|
523
1049
|
| `background` | `string` | `''` | Free-form CSS color (e.g. a dynamic tag/folder color); when empty, falls back to the default token background (`$slate-soft`). |
|
|
524
1050
|
| `iconLabel` | `string` | `''` | Accessible name for the trailing icon button (icon-only control). |
|
|
525
1051
|
|
|
@@ -1060,7 +1586,7 @@ only the current selection it's handed via `item`.
|
|
|
1060
1586
|
| Prop | Type | Default | Description |
|
|
1061
1587
|
| ------------ | ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1062
1588
|
| `item` | `DsSelectorItem \| null` | `null` | Selected item (`{ name, color? }`); `null`/absent renders the empty state. |
|
|
1063
|
-
| `icon` | `string` | `''` | Material
|
|
1589
|
+
| `icon` | `string` | `''` | Material Symbols ligature (e.g. `folder`); omitted entirely (no icon rendered) when unset. |
|
|
1064
1590
|
| `emptyTitle` | `string` | `''` | Visible label shown when `item` is empty. |
|
|
1065
1591
|
| `ariaLabel` | `string` | `''` | Accessible name for the button. Required when the empty state has no `emptyTitle` (otherwise the button would have no name); when `item.name`/`emptyTitle` render, that visible text already names it. |
|
|
1066
1592
|
| `disabled` | `boolean` | `false` | Disables the button (opacity 0.6) and blocks the click handler. |
|
|
@@ -1277,7 +1803,7 @@ an icon-only rail. **Presentational only**: it renders as a real `<button>` and
|
|
|
1277
1803
|
|
|
1278
1804
|
| Prop | Type | Default | Description |
|
|
1279
1805
|
| ----------- | --------- | ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
1280
|
-
| `icon` | `string` | — (required) | Material
|
|
1806
|
+
| `icon` | `string` | — (required) | Material Symbols ligature name. |
|
|
1281
1807
|
| `text` | `string` | `''` | Row label; a default slot overrides it. Stays in the DOM (visually hidden, not removed) when `collapsed`. |
|
|
1282
1808
|
| `active` | `boolean` | `false` | Marks the current row: white surface, tinted border, `aria-current="page"`. |
|
|
1283
1809
|
| `collapsed` | `boolean` | `false` | Icon-only collapsed rail. |
|
|
@@ -1463,22 +1989,49 @@ no `floating-ui` — for the same reason as `DsDrawer`: the Vue 2 twin has to re
|
|
|
1463
1989
|
API and markup, and Element Plus is Vue 3 only (SALESQL-3968).
|
|
1464
1990
|
|
|
1465
1991
|
It replaces frontend-app's `el-popper` override (the company card), which added a 1px grey
|
|
1466
|
-
ring and 8px of padding on top of Element Plus. Positioning is pure CSS
|
|
1467
|
-
`DsTooltip`.
|
|
1992
|
+
ring and 8px of padding on top of Element Plus. Positioning is pure CSS.
|
|
1468
1993
|
|
|
1469
1994
|
**Presentational only**: it never closes itself — it asks the consumer through
|
|
1470
1995
|
`v-model:open`.
|
|
1471
1996
|
|
|
1472
1997
|
### Props
|
|
1473
1998
|
|
|
1474
|
-
| Prop | Type
|
|
1475
|
-
| ---------------- |
|
|
1476
|
-
| `open` | `boolean`
|
|
1477
|
-
| `placement` | `
|
|
1478
|
-
| `width` | `string`
|
|
1479
|
-
| `closeOnEscape` | `boolean`
|
|
1480
|
-
| `closeOnOutside` | `boolean`
|
|
1481
|
-
| `triggerOnClick` | `boolean`
|
|
1999
|
+
| Prop | Type | Default | Description |
|
|
2000
|
+
| ---------------- | ------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
2001
|
+
| `open` | `boolean` | `false` | Visibility. Pair with `v-model:open`. |
|
|
2002
|
+
| `placement` | `DsPopoverPlacement` (14) | `'bottom'` | Where the panel opens — see **Placement** below. |
|
|
2003
|
+
| `width` | `string` | `''` | Panel width (any CSS length). Empty = fit content. |
|
|
2004
|
+
| `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
|
|
2005
|
+
| `closeOnOutside` | `boolean` | `true` | A press outside the trigger and panel requests a close. |
|
|
2006
|
+
| `triggerOnClick` | `boolean` | `true` | Let the trigger slot toggle the panel. Off = consumer-driven. |
|
|
2007
|
+
| `offset` | `string` | `''` | Moves the anchor along the trigger's cross axis (any CSS length; `%` = of the trigger box). The contact-data cell uses `'25%'`. |
|
|
2008
|
+
| `flush` | `boolean` | `false` | Drops the 8px card padding for content with its own rows/dividers (e.g. `DsContactList`). |
|
|
2009
|
+
|
|
2010
|
+
### Placement
|
|
2011
|
+
|
|
2012
|
+
`side` or `side-alignment`, 14 values from `DS_POPOVER_PLACEMENTS`:
|
|
2013
|
+
|
|
2014
|
+
| Form | Where the panel goes |
|
|
2015
|
+
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2016
|
+
| `bottom` | Below, **centred** on the trigger. |
|
|
2017
|
+
| `bottom-start` | Below, flush with the trigger's **leading** edge (`left: 0`). |
|
|
2018
|
+
| `bottom-end` | Below, flush with the trigger's **trailing** edge (`right: 0`). |
|
|
2019
|
+
| `top` · `top-start` · `top-end` | Same three, above the trigger. |
|
|
2020
|
+
| `left` · `left-start` · `left-end` | Beside it; the alignment runs on the **vertical** axis. |
|
|
2021
|
+
| `right` · `right-start` · `right-end` | Idem, on the other side. |
|
|
2022
|
+
| `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`). |
|
|
2023
|
+
|
|
2024
|
+
The aligned forms are not decoration. The DS company card is
|
|
2025
|
+
`{ position: absolute, top: 'calc(100% + 6px)', left: 0 }` — i.e. **`bottom-start`**.
|
|
2026
|
+
Centring it would move the card off its trigger's edge, which is why the four bare sides
|
|
2027
|
+
alone could not express it.
|
|
2028
|
+
|
|
2029
|
+
The bare sides keep their 3.1.0 meaning (centred), so this is purely additive.
|
|
2030
|
+
|
|
2031
|
+
> `DsTooltip` deliberately stays 4-way: no consumer needs an aligned tooltip, and adding
|
|
2032
|
+
> API on symmetry alone is speculative. The shared `useViewportClamp` already accepts the
|
|
2033
|
+
> suffixed form — it reads only the side — so adopting it there later is a type change,
|
|
2034
|
+
> not a rewrite.
|
|
1482
2035
|
|
|
1483
2036
|
### Slots
|
|
1484
2037
|
|