@salesql/sql_components_vue3 3.17.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useViewportClamp.d.ts +9 -4
- package/dist/constants/contact-data.d.ts +31 -1
- package/dist/constants/events.d.ts +4 -0
- package/dist/icons/icons.types.d.ts +38 -0
- package/dist/icons/registry.d.ts +30 -0
- package/dist/icons/registry.generated.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.es.js +3842 -2565
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsActionMenu/DsActionMenu.vue.d.ts +1 -1
- package/dist/ui/DsCheckbox/DsCheckbox.vue.d.ts +1 -1
- package/dist/ui/DsContactCell/DsContactCell.types.d.ts +23 -1
- package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +55 -1
- package/dist/ui/DsContactList/DsContactList.types.d.ts +11 -1
- package/dist/ui/DsContactList/DsContactList.vue.d.ts +36 -0
- package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.types.d.ts +10 -2
- package/dist/ui/DsDeliverabilityBadge/DsDeliverabilityBadge.vue.d.ts +11 -1
- package/dist/ui/DsEmailEditor/DsEmailEditor.types.d.ts +35 -0
- package/dist/ui/DsEmailEditor/DsEmailEditor.vue.d.ts +30 -0
- package/dist/ui/DsEmailEditor/index.d.ts +2 -0
- package/dist/ui/DsIcon/DsIcon.story-weights.d.ts +2 -0
- package/dist/ui/DsIcon/DsIcon.types.d.ts +31 -0
- package/dist/ui/DsIcon/DsIcon.vue.d.ts +66 -0
- package/dist/ui/DsIcon/index.d.ts +2 -0
- package/dist/ui/DsInput/DsInput.types.d.ts +1 -0
- package/dist/ui/DsPopover/DsPopover.types.d.ts +12 -1
- package/dist/ui/DsPopover/DsPopover.vue.d.ts +10 -1
- package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +1 -1
- package/llms-full.txt +313 -73
- package/llms.txt +3 -1
- package/package.json +10 -2
- package/scripts/generate-icons.mjs +107 -0
- package/scripts/icons-svg.mjs +185 -0
- package/src/icons/NOTICE +8 -0
- package/src/icons/manifest.json +138 -0
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.18.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,7 +37,7 @@ 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 (
|
|
40
|
+
## Components (55)
|
|
41
41
|
|
|
42
42
|
- **DsCompanyCard** (Company) — The card the prospector opens from its company cell — the design export's `CompanyDetails`
|
|
43
43
|
- **DsCompanyLogo** (Company) — A company's logo in the DS hairline box: white, 1px `slate-tint` ring, 4px radius, the image
|
|
@@ -46,7 +46,8 @@ Components size their own glyphs (their scoped rules outrank the 20px default),
|
|
|
46
46
|
- **DsContactCell** (Contact data) — The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
|
|
47
47
|
- **DsContactList** (Contact data) — The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
|
|
48
48
|
- **DsContactPlaceholder** (Contact data) — The row a contact-data group shows when it has no rows to show — the non-data rows of the
|
|
49
|
-
- **DsDeliverabilityBadge** (Contact data) — The
|
|
49
|
+
- **DsDeliverabilityBadge** (Contact data) — The verification badge. By default (§3.3, «modelo Lusha») a bare green `A+` superscript with
|
|
50
|
+
- **DsEmailEditor** (Contact data) — The **«Edit emails» form** of a contact: a header (title, optional back and close), one input per
|
|
50
51
|
- **DsMaskedValue** (Contact data) — An email or phone string with the contract's two-tone treatment when the **server** masked
|
|
51
52
|
- **DsMoreCountChip** (Contact data) — The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
|
|
52
53
|
- **DsOrganizerForm** (Contact data) — The in-panel **create / edit form** of the organizers (folders, tags): a back row with the title,
|
|
@@ -56,6 +57,7 @@ Components size their own glyphs (their scoped rules outrank the 20px default),
|
|
|
56
57
|
- **DsAvatar** (Core) — Contact/user avatar: an image, generated initials with a deterministic color hash, or an
|
|
57
58
|
- **DsBadge** (Core) — Solid, white-text pill for value types and counts (e.g. "Work", "New"). **Presentational
|
|
58
59
|
- **DsButton** (Core) — Standard clickable control with the DS variant/size vocabulary, plus icon-only
|
|
60
|
+
- **DsIcon** (Core) — A Material Symbols icon drawn as inline SVG, with the font axes fixed by size. **Presentational
|
|
59
61
|
- **DsSpinner** (Core) — Indeterminate loading indicator — a circular SVG spinner. **Presentational only**: no
|
|
60
62
|
- **DsTag** (Core) — Small bordered chip with an optional × close control. **Presentational only**: `close`
|
|
61
63
|
- **DsCell** (Data) — A single `<td>` cell in the `DsTable` compound API. **Presentational only**: no props
|
|
@@ -309,8 +311,10 @@ With `type` set it is also the **full-profile row** (type glyph on the left, §3
|
|
|
309
311
|
|
|
310
312
|
### Behaviour — hover opens, click pins, ESC closes
|
|
311
313
|
|
|
312
|
-
- **Hover** anywhere on the cell opens the popover (1 or N items, revealed or not)
|
|
313
|
-
`update:open(true)` — lazy-load the group there if you need
|
|
314
|
+
- **Hover** anywhere on the cell opens the popover (1 or N items, revealed or not) after
|
|
315
|
+
`enterDelay` (200 ms) and emits `update:open(true)` — lazy-load the group there if you need
|
|
316
|
+
to. Sweeping the pointer across a column opens nothing: leaving before the delay cancels it.
|
|
317
|
+
A click opens at once, and moving into the open panel is never delayed.
|
|
314
318
|
- **Leaving** closes after `leaveDelay` (220 ms) unless pinned. Re-entering cancels.
|
|
315
319
|
- **Click** on the value pins it (leaving no longer closes); a second click releases.
|
|
316
320
|
- **ESC** (anywhere in the document) and a **click outside** close and un-pin.
|
|
@@ -322,29 +326,32 @@ With `type` set it is also the **full-profile row** (type glyph on the left, §3
|
|
|
322
326
|
|
|
323
327
|
### Props
|
|
324
328
|
|
|
325
|
-
| Prop
|
|
326
|
-
|
|
|
327
|
-
| `items`
|
|
328
|
-
| `count`
|
|
329
|
-
| `sections`
|
|
330
|
-
| `kind`
|
|
331
|
-
| `type`
|
|
332
|
-
| `label`
|
|
333
|
-
| `badgeLabel`
|
|
334
|
-
| `badgeTooltip`
|
|
335
|
-
| `
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
339
|
-
| `
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
329
|
+
| Prop | Type | Default | Description |
|
|
330
|
+
| ----------------------------------- | ------------------------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
331
|
+
| `items` | `DsContactItem[]` | — | The group, **primary first**; `items[0]` is what the cell shows (required). |
|
|
332
|
+
| `count` | `number \| null` | `null` | Group size the chip subtracts from (`+N` = count − 1). Server count when it exists; else `items.length`. |
|
|
333
|
+
| `sections` | `DsContactSection[]` | `[]` | Unified columns (Emails: Work + Direct; Phones: Direct + HQ): the popover bands each type, one total. `items` still drives the cell. |
|
|
334
|
+
| `kind` | `'email' \| 'phone'` | — | Masked split rule; badge eligibility (required). |
|
|
335
|
+
| `type` | `DsContactType` | `''` | Draws the type glyph. Omitted, the **primary item's** `type` is used (a unified column shows the glyph of the value it shows); an explicit value wins. A `direct` phone draws `call`, a `direct` email `mail`. |
|
|
336
|
+
| `label` | `string` | — | The popover variant name ("Work emails"). App copy (required). |
|
|
337
|
+
| `badgeLabel` | `string` | — | `A_PLUS_BADGE` (required). |
|
|
338
|
+
| `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
|
|
339
|
+
| `verifyingLabel` … `invalidTooltip` | `string` | `''` | Copy of the «Verifying» / «Invalid» pills of the **popover rows** (never the cell). Each pill renders only when its label is non-empty (opt-in); the tooltip is its meaning and accessible name. |
|
|
340
|
+
| `moreLabel` | `string` | `''` | Accessible name for the `+N` chip ("2 more emails"). |
|
|
341
|
+
| `emptyLabel` | `string` | `'—'` | Rendered when `items` is empty (a typographic dash, not copy). |
|
|
342
|
+
| `showRate` | `boolean` | `false` | Thumbs up / down in the popover rows (a row with `rateable: false` keeps only Copy). |
|
|
343
|
+
| `disabled` | `boolean` | `false` | No popover at all. |
|
|
344
|
+
| `placement` | `DsPopoverPlacement` | `'over-start'` | Popover side / alignment. `over-start` covers the cell like the export; `bottom-start` opens below it. |
|
|
345
|
+
| `offset` | `string` | `'25%'` | Popover anchor shift along the cell (the contract's ¼). |
|
|
346
|
+
| `popoverWidth` | `string` | `'300px'` | Popover width (export `DataPopover`). |
|
|
347
|
+
| `teleported` | `boolean` | `false` | Renders the popover in `<body>` so a scroller or clipping cell (the prospector table) cannot cut it. Hover still travels cell → panel. |
|
|
348
|
+
| `revealLabel` | `string` | `''` | Copy of the «Show details» CTA in the popover header. Rendered only while some item is `masked` **and** this is non-empty (opt-in). |
|
|
349
|
+
| `revealTooltip` | `string` | `''` | What the CTA costs («1 credit»), shown in a `DsTooltip` to the left of the button. Empty = no tooltip. |
|
|
350
|
+
| `revealing` | `boolean` | `false` | The consumer's reveal is in flight: the CTA spins and ignores clicks. |
|
|
351
|
+
| `boundary` | `HTMLElement \| (() => DOMRect \| null) \| null` | `null` | Area the popover must stay inside, besides the viewport — forwarded to `DsPopover`. For a sticky «Actions» column, pass the area to its left (see the story «Boundary»). |
|
|
352
|
+
| `enterDelay` | `number` | `200` | How long hover must last before the popover opens (ms). Leaving sooner cancels; click still opens at once; `0` opens on enter. |
|
|
353
|
+
| `leaveDelay` | `number` | `220` | Grace before an unpinned popover closes after the pointer leaves (ms). |
|
|
354
|
+
| `copyLabel` … `incorrectLabel` | `string` | English | Accessible labels forwarded to the list's icon-only actions. |
|
|
348
355
|
|
|
349
356
|
### Events
|
|
350
357
|
|
|
@@ -370,6 +377,15 @@ cut at the scroller's edge (see the story «In a scrolling table»: untick _Tele
|
|
|
370
377
|
panel travel (the panel's enter / leave cancel and restart the same close timer), and
|
|
371
378
|
`DsPopover` closes it once the cell's row scrolls out of view.
|
|
372
379
|
|
|
380
|
+
### Keeping clear of the Actions column
|
|
381
|
+
|
|
382
|
+
In the prospector the last contact column sits against the sticky «Actions» column, and the
|
|
383
|
+
panel — over the cell, ¼ in, 300px wide — used to open on top of it. `boundary` (forwarded to
|
|
384
|
+
`DsPopover`) is the area the panel must stay inside, so pass the area to the **left** of
|
|
385
|
+
Actions, as a getter: `() => new DOMRect(0, 0, actionsHeader.getBoundingClientRect().left,
|
|
386
|
+
window.innerHeight)`. The panel then stops flush against Actions (and is narrowed if it is
|
|
387
|
+
wider than the room left). Story: «Boundary — sticky Actions column».
|
|
388
|
+
|
|
373
389
|
### Feeding it from the app's view model
|
|
374
390
|
|
|
375
391
|
The cell classifies nothing. The consumer passes one **bucket** and adapts each item to
|
|
@@ -390,6 +406,11 @@ const toItem = (it) => ({ const toItem = (it) => ({
|
|
|
390
406
|
// count = mobile + direct — NEVER vm.counts.phones (it includes HQ)
|
|
391
407
|
```
|
|
392
408
|
|
|
409
|
+
`status` is optional and wins over `valid` — set it when the app can tell more than valid / not:
|
|
410
|
+
`'verifying'` and `'invalid'` draw a pill on the popover **rows** (never in the cell); `valid`
|
|
411
|
+
alone keeps working untouched. The item still counts in `+N`, and the app owns the order.
|
|
412
|
+
`rateable: false` marks a row whose thumbs must not show (a value the user typed in): Copy stays.
|
|
413
|
+
|
|
393
414
|
Labels and badge strings come from the app's `contact-data-contract/contactDataCopy.js`
|
|
394
415
|
(`COLUMN_LABEL`, `TYPE_LABEL`, `A_PLUS_BADGE`, `A_PLUS_TOOLTIP`).
|
|
395
416
|
|
|
@@ -427,24 +448,28 @@ quiet uppercase band per type («WORK (2)»), its rows under it, and one total i
|
|
|
427
448
|
|
|
428
449
|
### Props
|
|
429
450
|
|
|
430
|
-
| Prop
|
|
431
|
-
|
|
|
432
|
-
| `items`
|
|
433
|
-
| `sections`
|
|
434
|
-
| `kind`
|
|
435
|
-
| `type`
|
|
436
|
-
| `title`
|
|
437
|
-
| `badgeLabel`
|
|
438
|
-
| `badgeTooltip`
|
|
439
|
-
| `
|
|
440
|
-
| `
|
|
441
|
-
| `
|
|
442
|
-
| `
|
|
443
|
-
| `
|
|
444
|
-
| `
|
|
445
|
-
|
|
446
|
-
`
|
|
447
|
-
|
|
451
|
+
| Prop | Type | Default | Description |
|
|
452
|
+
| ------------------ | -------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
453
|
+
| `items` | `DsContactItem[]` | `[]` | The group, primary first, as the view model delivers it. Never reordered. Omit when `sections` drive the rows. |
|
|
454
|
+
| `sections` | `DsContactSection[]` | `[]` | Unified variants: `{ type, label, items }` per type → a band + its rows; empty types are skipped. |
|
|
455
|
+
| `kind` | `'email' \| 'phone'` | — | Masked split rule, and whether a badge may ever render (required). |
|
|
456
|
+
| `type` | `DsContactType` | `''` | `work` · `direct` · `mobile` · `hq` · `other` → the left glyph. Omit for none. |
|
|
457
|
+
| `title` | `string` | `''` | Variant name in the header ("Work emails"). The total `(N)` is appended. App copy. |
|
|
458
|
+
| `badgeLabel` | `string` | — | `A_PLUS_BADGE` — rendered only on valid emails (required). |
|
|
459
|
+
| `badgeTooltip` | `string` | — | `A_PLUS_TOOLTIP` (required). |
|
|
460
|
+
| `verifyingLabel` | `string` | `''` | Text of the «Verifying» pill (`status: 'verifying'`). The pill renders only when this is non-empty. |
|
|
461
|
+
| `verifyingTooltip` | `string` | `''` | The pill's meaning and accessible name. |
|
|
462
|
+
| `invalidLabel` | `string` | `''` | Text of the «Invalid» pill (`status: 'invalid'`). Same opt-in. |
|
|
463
|
+
| `invalidTooltip` | `string` | `''` | The pill's meaning and accessible name. |
|
|
464
|
+
| `showRate` | `boolean` | `false` | Adds thumbs up / down to unmasked rows (except those with `rateable: false`). |
|
|
465
|
+
| `emptyLabel` | `string` | `''` | Shown when `items` is empty. Omit to render nothing. |
|
|
466
|
+
| `copyLabel` | `string` | `'Copy'` | Accessible label / title of the copy button. |
|
|
467
|
+
| `copiedLabel` | `string` | `'Copied!'` | Shown for ~1.2 s after a copy. |
|
|
468
|
+
| `correctLabel` | `string` | `'Correct'` | Accessible label of thumbs-up. |
|
|
469
|
+
| `incorrectLabel` | `string` | `'Incorrect'` | Accessible label of thumbs-down. |
|
|
470
|
+
|
|
471
|
+
`DsContactItem` is `{ id, value, masked, valid, primary, rating?, status?, rateable? }` — see
|
|
472
|
+
`DsContactCell` for the mapping from the app's view model.
|
|
448
473
|
|
|
449
474
|
### Events
|
|
450
475
|
|
|
@@ -462,7 +487,11 @@ for the mapping from the app's view model.
|
|
|
462
487
|
|
|
463
488
|
### Rules it enforces
|
|
464
489
|
|
|
465
|
-
- **Badge** = `kind === 'email'
|
|
490
|
+
- **Badge** = `kind === 'email'` and a verdict: `status` (when set) wins over `valid`;
|
|
491
|
+
`valid` → A+, `verifying` / `invalid` → a pill (once its copy is passed). Phones never;
|
|
492
|
+
masked emails with a verdict yes. No verdict, no mark. Rows are never reordered.
|
|
493
|
+
- **Rate** = `showRate && item.rateable !== false`. A user-added row sets `rateable: false`:
|
|
494
|
+
it offers Copy only, while the other rows keep the thumbs.
|
|
466
495
|
- **Masked rows have no actions** — there is no full value to copy or judge.
|
|
467
496
|
- **Keys** are `item.id`, falling back to the value. Never the index.
|
|
468
497
|
|
|
@@ -530,27 +559,35 @@ already rules that edge), as `DsProfileGroupBar` does.
|
|
|
530
559
|
|
|
531
560
|
## DsDeliverabilityBadge
|
|
532
561
|
|
|
533
|
-
The
|
|
534
|
-
|
|
535
|
-
|
|
562
|
+
The verification badge. By default (§3.3, «modelo Lusha») a bare green `A+` superscript with
|
|
563
|
+
the tooltip that carries its meaning. Valid / Unverifiable / accept-all / last-verified badges
|
|
564
|
+
were retired on 2026-07-09 — `status` adds only the two states a row can be in besides A+:
|
|
565
|
+
|
|
566
|
+
- `verifying` — grey pill with a 12px spinner (`DsSpinner`, `dark`) and the word.
|
|
567
|
+
- `invalid` — text-only pill on the error tint, text in `error-deep`.
|
|
536
568
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
569
|
+
Both pills are `caption` bold, `radius-control`, 24px tall (`control-height('small')`, the
|
|
570
|
+
smallest step of the height scale).
|
|
571
|
+
|
|
572
|
+
**It does not decide whether to show.** The rule is the composer's: an email with a verdict
|
|
573
|
+
(`valid` → A+, `verifying`, `invalid`). Phones never carry verification, whatever their
|
|
574
|
+
status; a masked preview with a verdict still gets its badge.
|
|
540
575
|
|
|
541
576
|
### Props
|
|
542
577
|
|
|
543
|
-
| Prop | Type | Default
|
|
544
|
-
| ----------- | ---------------------------------------- |
|
|
545
|
-
| `
|
|
546
|
-
| `
|
|
547
|
-
| `
|
|
548
|
-
| `
|
|
578
|
+
| Prop | Type | Default | Description |
|
|
579
|
+
| ----------- | ---------------------------------------- | ---------- | ----------------------------------------------------------------------------- |
|
|
580
|
+
| `status` | `'a-plus' \| 'verifying' \| 'invalid'` | `'a-plus'` | Which badge. `a-plus` is the bare glyph; the other two are pills. |
|
|
581
|
+
| `label` | `string` | — | The visible text: `A_PLUS_BADGE` or the pill's word. App copy (required). |
|
|
582
|
+
| `tooltip` | `string` | — | The meaning, shown on hover/focus; also the accessible name (required). |
|
|
583
|
+
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Tooltip side. |
|
|
584
|
+
| `focusable` | `boolean` | `true` | Standalone, the glyph is a tab stop. Inside a focusable trigger pass `false`. |
|
|
549
585
|
|
|
550
586
|
### Accessibility
|
|
551
587
|
|
|
552
588
|
- The glyph is `role="img"` with `aria-label` = `tooltip`, so a screen reader announces the
|
|
553
|
-
meaning rather than two letters.
|
|
589
|
+
meaning rather than two letters (or the pill's word). The pill's spinner is decorative
|
|
590
|
+
(`aria-hidden`) and stops rotating under `prefers-reduced-motion`.
|
|
554
591
|
- Standalone it is keyboard-reachable (`tabindex="0"`) and the tooltip opens on focus.
|
|
555
592
|
- **Known gap, recorded by the contract:** `#2E9E6E` on white is 3.37:1 at 9px, below the
|
|
556
593
|
4.5:1 AA floor. It is frozen because three surfaces must match; raising it is a design
|
|
@@ -563,6 +600,84 @@ colour `$contact-data-badge-a-plus-ink`. Mirrored 1:1 from the contract partial.
|
|
|
563
600
|
|
|
564
601
|
---
|
|
565
602
|
|
|
603
|
+
<!-- DsEmailEditor · Contact data -->
|
|
604
|
+
|
|
605
|
+
## DsEmailEditor
|
|
606
|
+
|
|
607
|
+
The **«Edit emails» form** of a contact: a header (title, optional back and close), one input per
|
|
608
|
+
email with a remove button, «+ Add email», the verification note and Cancel / Save. It is shown
|
|
609
|
+
inside the contact cell popover and in the full-profile contact card, and works on its own in any
|
|
610
|
+
~300-320px panel.
|
|
611
|
+
|
|
612
|
+
The editor draws its own dividers (under the header, over the footer) and has no outer padding or
|
|
613
|
+
border: the container supplies the surface, radius and shadow, and the editor fills it edge to edge.
|
|
614
|
+
|
|
615
|
+
Presentational and **uncontrolled**: it edits a working copy of `items` (seeded when it mounts)
|
|
616
|
+
and reports intent. `cancel` closes nothing and `save` persists nothing, both are the consumer's
|
|
617
|
+
job. There are no status marks (pills) inside the editor: the state is not shown while editing.
|
|
618
|
+
|
|
619
|
+
### Props
|
|
620
|
+
|
|
621
|
+
| Prop | Type | Default | Description |
|
|
622
|
+
| ------- | --------------------- | ------- | --------------------------------------------------------------------------------------------- |
|
|
623
|
+
| `items` | `{ value: string }[]` | — | The current emails (required). Seeds the rows on mount and is the baseline of «what changed». |
|
|
624
|
+
| `copy` | `DsEmailEditorCopy` | — | Every visible string (required). The app owns it. |
|
|
625
|
+
|
|
626
|
+
#### `copy` keys
|
|
627
|
+
|
|
628
|
+
| Key | Used for |
|
|
629
|
+
| ---------------- | -------------------------------------------------------------------------------------- |
|
|
630
|
+
| `title` | Heading of the form; it names the group. |
|
|
631
|
+
| `back` | `aria-label` of the header's back button. Optional: the button renders only when set. |
|
|
632
|
+
| `close` | `aria-label` of the header's close button. Optional: the button renders only when set. |
|
|
633
|
+
| `addEmail` | The «+ Add email» button. |
|
|
634
|
+
| `emailLabel` | Visually hidden label of every email input. |
|
|
635
|
+
| `placeholder` | Placeholder of every email input. |
|
|
636
|
+
| `note` | The info note (verification credit warning). |
|
|
637
|
+
| `cancel`, `save` | The footer buttons. |
|
|
638
|
+
| `invalidEmail` | Error under a row whose text is not an email. |
|
|
639
|
+
| `duplicateEmail` | Error under the later occurrence of a repeated email. |
|
|
640
|
+
| `removeEmail` | `aria-label` of every row's remove button. |
|
|
641
|
+
|
|
642
|
+
### Events
|
|
643
|
+
|
|
644
|
+
| Event | Payload | When |
|
|
645
|
+
| -------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
646
|
+
| `cancel` | — | Cancel or the header's back button was used (leave without saving). |
|
|
647
|
+
| `close` | — | The header's close button was used. Dismissing the host (popover, panel) is the consumer's job. |
|
|
648
|
+
| `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). |
|
|
649
|
+
|
|
650
|
+
### Behaviour
|
|
651
|
+
|
|
652
|
+
- Save is disabled while nothing changed: same emails in the same order after trimming and
|
|
653
|
+
dropping empty rows. Removing a row, editing one or reordering all count as a change.
|
|
654
|
+
- Validation runs on the first Save attempt and is live from then on. A text that is not an
|
|
655
|
+
email gets `invalidEmail`; a repeat (trimmed, case-insensitive) gets `duplicateEmail` on the
|
|
656
|
+
later occurrences. An invalid text is never also reported as a duplicate. Empty rows are
|
|
657
|
+
discarded, never an error. With errors, Save emits nothing and focuses the first failing row.
|
|
658
|
+
- «+ Add email» appends an empty row and focuses it.
|
|
659
|
+
- Enter in an input is swallowed (`preventDefault`): it never submits a host `<form>` and does not save.
|
|
660
|
+
Escape is not handled: closing is the container's job, like in the other library forms.
|
|
661
|
+
- A11y: each input has a visually hidden `<label>`; an error sets `aria-invalid` and is linked with
|
|
662
|
+
`aria-describedby`; the remove buttons carry `copy.removeEmail`.
|
|
663
|
+
- The input height is 32px (`control-height('medium')`), the focus border is the library's dark grey token
|
|
664
|
+
(never the accent) and the text weight does not change on focus.
|
|
665
|
+
- Sections: header (`6px 8px 6px 6px`, hairline below), body (`12px 12px 4px`, rows 8px apart, max
|
|
666
|
+
height 248px with the library scrollbar), note, footer (`10px 12px`, hairline above, 32px buttons).
|
|
667
|
+
- Every icon is a `DsIcon`: remove `do_not_disturb_on` (20, `danger`), add `add` (20, accent),
|
|
668
|
+
note `info` (16, `muted`), back `chevron_left` (20, filled, `default`), close `close` (20, `muted`).
|
|
669
|
+
The design's 18px and 14px glyphs move to 20 and 16, the sizes `DsIcon` has.
|
|
670
|
+
|
|
671
|
+
#### Where it deliberately differs from the design export
|
|
672
|
+
|
|
673
|
+
The export's input draws an accent focus border, bold text on focus and a dark rest border. The
|
|
674
|
+
library's input rule wins (`DsInput`: focus `slate-main`, no bold, rest `slate-muted`), so the
|
|
675
|
+
inputs here follow it. The 12.5px / 11.5px type snaps to the 12px caption token and the 13px
|
|
676
|
+
buttons to the `small` size; the header icon buttons and «Add email» are native 28px controls
|
|
677
|
+
because `DsButton` has no 28px size.
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
566
681
|
<!-- DsMaskedValue · Contact data -->
|
|
567
682
|
|
|
568
683
|
## DsMaskedValue
|
|
@@ -1201,6 +1316,114 @@ next.
|
|
|
1201
1316
|
|
|
1202
1317
|
---
|
|
1203
1318
|
|
|
1319
|
+
<!-- DsIcon · Core -->
|
|
1320
|
+
|
|
1321
|
+
## DsIcon
|
|
1322
|
+
|
|
1323
|
+
A Material Symbols icon drawn as inline SVG, with the font axes fixed by size. **Presentational
|
|
1324
|
+
only**: no events, no state. It draws the same symbols the `material-symbols-*` font classes do,
|
|
1325
|
+
but the stroke is a fixed weight (500 by default) that no longer depends on what the app loads.
|
|
1326
|
+
|
|
1327
|
+
```vue
|
|
1328
|
+
<DsIcon name="close" variant="rounded" :size="16" />
|
|
1329
|
+
<DsIcon name="check_circle" variant="rounded" fill color="success" />
|
|
1330
|
+
```
|
|
1331
|
+
|
|
1332
|
+
### Props
|
|
1333
|
+
|
|
1334
|
+
| Prop | Type | Default | Description |
|
|
1335
|
+
| --------- | -------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------- |
|
|
1336
|
+
| `name` | `string` | (required) | Material Symbols name. Built-in or added with `registerIcons`. Legacy aliases resolve. |
|
|
1337
|
+
| `size` | `16 \| 20 \| 24` | `20` | Box in px. 16 and 20 use the optical size 20 drawing; 24 uses optical size 24. |
|
|
1338
|
+
| `variant` | `'outlined' \| 'rounded'` | `'outlined'` | Symbol family. |
|
|
1339
|
+
| `weight` | `100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700` | `500` | Stroke weight. The library ships 500; another weight draws once the app registers it, otherwise 500 is drawn and it warns. |
|
|
1340
|
+
| `fill` | `boolean` | `false` | The FILL 1 drawing: active or selected states and status icons. |
|
|
1341
|
+
| `color` | `'default' \| 'muted' \| 'success' \| 'warning' \| 'danger' \| 'disabled'` | none | A DS color. Without it the icon inherits `currentColor`. |
|
|
1342
|
+
|
|
1343
|
+
`color` tokens: `default` slate-main, `muted` slate-soft, `success` success-deep, `warning`
|
|
1344
|
+
warning-shadow, `danger` error-shadow, `disabled` slate-mid.
|
|
1345
|
+
|
|
1346
|
+
### Registry
|
|
1347
|
+
|
|
1348
|
+
The registry is curated, not the full Material Symbols set: it holds the icons the library draws
|
|
1349
|
+
today, in the `outlined` and `rounded` families, at weight 500. The drawings are the official SVGs
|
|
1350
|
+
of `google/material-design-icons` pinned to a commit (`src/icons/manifest.json`), generated into
|
|
1351
|
+
`registry.generated.ts` by `pnpm icons:generate`. Adding a built-in icon is a manifest edit plus a
|
|
1352
|
+
regenerate.
|
|
1353
|
+
|
|
1354
|
+
An app adds its own icons with `registerIcons`, once at startup. Drawings are keyed by family and
|
|
1355
|
+
weight:
|
|
1356
|
+
|
|
1357
|
+
```ts
|
|
1358
|
+
import { registerIcons } from '@salesql/sql_components_vue3';
|
|
1359
|
+
|
|
1360
|
+
registerIcons({
|
|
1361
|
+
my_logo: {
|
|
1362
|
+
rounded: {
|
|
1363
|
+
500: {
|
|
1364
|
+
compact: 'M…', // sizes 16 and 20
|
|
1365
|
+
compactFill: 'M…', // sizes 16 and 20, fill
|
|
1366
|
+
regular: 'M…', // size 24
|
|
1367
|
+
regularFill: 'M…', // size 24, fill
|
|
1368
|
+
},
|
|
1369
|
+
},
|
|
1370
|
+
},
|
|
1371
|
+
});
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
A drawing is the `d` of the path in the `0 -960 960 960` viewBox, or `{ d, viewBox }` for another
|
|
1375
|
+
box. If the icon has a single drawing, pass the same one four times. A family without the weight
|
|
1376
|
+
level (`rounded: { compact, … }`) counts as weight 500.
|
|
1377
|
+
|
|
1378
|
+
- A new family or weight of an existing icon is added without `override`; the 500 of a built-in
|
|
1379
|
+
icon is not touched. `registerIcons(map)` never replaces a drawing that already exists for the
|
|
1380
|
+
same name, family and weight (built-in, alias or already registered): it warns once and keeps the
|
|
1381
|
+
original. `registerIcons(map, { override: true })` replaces just that drawing.
|
|
1382
|
+
- A registration after an icon was mounted updates it.
|
|
1383
|
+
|
|
1384
|
+
### Other weights
|
|
1385
|
+
|
|
1386
|
+
The library ships weight 500 only. To draw `<DsIcon weight="600" />`, the app generates the
|
|
1387
|
+
drawings it needs from the same SVG source and registers them:
|
|
1388
|
+
|
|
1389
|
+
```bash
|
|
1390
|
+
pnpm exec salesql-icons --weight 600 --names error,info --out src/icons/weight600.generated.ts
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
```ts
|
|
1394
|
+
import { registerIcons } from '@salesql/sql_components_vue3';
|
|
1395
|
+
import { ICONS } from './icons/weight600.generated';
|
|
1396
|
+
|
|
1397
|
+
registerIcons(ICONS);
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
Options: `--weight 100..700` (default 500), `--names a,b,c` (default: the library icons),
|
|
1401
|
+
`--families outlined,rounded` and `--out <path>` (writes the module). It needs Node 18 or newer.
|
|
1402
|
+
A weight that is not registered draws 500 and warns once per icon and weight.
|
|
1403
|
+
|
|
1404
|
+
### Variants and fallbacks
|
|
1405
|
+
|
|
1406
|
+
- A `variant` the icon does not have warns once per icon and variant, and draws the other family.
|
|
1407
|
+
Every built-in icon ships both families, so this only happens with icons an app registers with a
|
|
1408
|
+
single family.
|
|
1409
|
+
- An unknown name draws an empty `<svg>` of the same box (the layout holds) and warns once per
|
|
1410
|
+
name.
|
|
1411
|
+
- Legacy names resolve to their canonical icon: `email` → `mail`, `mode_edit` → `edit`,
|
|
1412
|
+
`phone` → `call`, `people_alt` → `group`, `save_alt` → `download`.
|
|
1413
|
+
|
|
1414
|
+
### Accessibility
|
|
1415
|
+
|
|
1416
|
+
`DsIcon` is always `aria-hidden="true"` and `focusable="false"`, with no role or label. When an
|
|
1417
|
+
icon carries meaning on its own, the container wraps it:
|
|
1418
|
+
|
|
1419
|
+
```vue
|
|
1420
|
+
<span role="img" aria-label="Verified"><DsIcon name="verified" variant="rounded" fill /></span>
|
|
1421
|
+
```
|
|
1422
|
+
|
|
1423
|
+
Icon-only buttons name the button, not the icon.
|
|
1424
|
+
|
|
1425
|
+
---
|
|
1426
|
+
|
|
1204
1427
|
<!-- DsSpinner · Core -->
|
|
1205
1428
|
|
|
1206
1429
|
## DsSpinner
|
|
@@ -2199,7 +2422,7 @@ via `v-model` (its `modelValue` is the current string value).
|
|
|
2199
2422
|
| --------------- | --------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2200
2423
|
| `modelValue` | `string` | `''` | v-model — current text value. |
|
|
2201
2424
|
| `type` | `'text' \| 'email' \| 'password' \| 'tel' \| 'number' \| 'search' \| 'url'` | `'text'` | Native input type. `password` renders a reveal toggle when `toggleLabel` is set; `search` always renders as a styled text input with a left search icon. |
|
|
2202
|
-
| `size` | `'sm' \| 'md'`
|
|
2425
|
+
| `size` | `'xs' \| 'sm' \| 'md'` | `'sm'` | Control height (32px / 36px / 48px). Padding, type scale and borders are the same for all; the suffix glyph is 16 / 18 / 24. |
|
|
2203
2426
|
| `placeholder` | `string` | `''` | Native placeholder text. |
|
|
2204
2427
|
| `disabled` | `boolean` | `false` | Disables the control. |
|
|
2205
2428
|
| `error` | `boolean` | `false` | Error visual state (`aria-invalid`, coral border). |
|
|
@@ -2736,18 +2959,19 @@ ring and 8px of padding on top of Element Plus. Positioning is pure CSS.
|
|
|
2736
2959
|
|
|
2737
2960
|
### Props
|
|
2738
2961
|
|
|
2739
|
-
| Prop | Type
|
|
2740
|
-
| ---------------- |
|
|
2741
|
-
| `open` | `boolean`
|
|
2742
|
-
| `placement` | `DsPopoverPlacement` (14)
|
|
2743
|
-
| `width` | `string`
|
|
2744
|
-
| `closeOnEscape` | `boolean`
|
|
2745
|
-
| `closeOnOutside` | `boolean`
|
|
2746
|
-
| `triggerOnClick` | `boolean`
|
|
2747
|
-
| `offset` | `string`
|
|
2748
|
-
| `flush` | `boolean`
|
|
2749
|
-
| `teleported` | `boolean`
|
|
2750
|
-
| `block` | `boolean`
|
|
2962
|
+
| Prop | Type | Default | Description |
|
|
2963
|
+
| ---------------- | ------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
2964
|
+
| `open` | `boolean` | `false` | Visibility. Pair with `v-model:open`. |
|
|
2965
|
+
| `placement` | `DsPopoverPlacement` (14) | `'bottom'` | Where the panel opens — see **Placement** below. |
|
|
2966
|
+
| `width` | `string` | `''` | Panel width (any CSS length). Empty = fit content. |
|
|
2967
|
+
| `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
|
|
2968
|
+
| `closeOnOutside` | `boolean` | `true` | A press outside the trigger and panel requests a close. |
|
|
2969
|
+
| `triggerOnClick` | `boolean` | `true` | Let the trigger slot toggle the panel. Off = consumer-driven. |
|
|
2970
|
+
| `offset` | `string` | `''` | Moves the anchor along the trigger's cross axis (any CSS length; `%` = of the trigger box). The contact-data cell uses `'25%'`. |
|
|
2971
|
+
| `flush` | `boolean` | `false` | Drops the 8px card padding for content with its own rows/dividers (e.g. `DsContactList`). |
|
|
2972
|
+
| `teleported` | `boolean` | `false` | Renders the panel in `<body>`, so no ancestor's `overflow` clips it (a table cell, a scroller). See **Teleported** below. |
|
|
2973
|
+
| `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). |
|
|
2974
|
+
| `boundary` | `HTMLElement \| (() => DOMRect \| null) \| null` | `null` | Area the panel must stay inside besides the viewport. See **Boundary** below. |
|
|
2751
2975
|
|
|
2752
2976
|
### Placement
|
|
2753
2977
|
|
|
@@ -2807,6 +3031,22 @@ viewport-only check would miss a row hidden by a scroller that is itself on scre
|
|
|
2807
3031
|
|
|
2808
3032
|
`DsCompanyCard`'s «In a scrolling table (teleported, block)» variant shows both behaviours.
|
|
2809
3033
|
|
|
3034
|
+
### Boundary
|
|
3035
|
+
|
|
3036
|
+
The viewport clamp only knows the window's edges, so in a table the panel of the last data
|
|
3037
|
+
column opened on top of the sticky «Actions» column (SALESQL-4428). `boundary` adds a second
|
|
3038
|
+
box the panel must stay inside — an element, or a getter returning its `DOMRect` (`null` = no
|
|
3039
|
+
boundary right now). The limits are the **intersection** of the viewport and that box, on all
|
|
3040
|
+
four edges: against the viewport the panel keeps its 8px margin, against the boundary it may
|
|
3041
|
+
sit flush. The panel is also capped to the width left between the limits, and a `left` /
|
|
3042
|
+
`right` / `top` / `bottom` placement flips when the boundary leaves it no room on its side.
|
|
3043
|
+
|
|
3044
|
+
The boundary is the **allowed area**, not the thing to avoid: to keep clear of a column, pass
|
|
3045
|
+
the area on its other side — a getter such as
|
|
3046
|
+
`() => new DOMRect(0, 0, actionsColumn.getBoundingClientRect().left, window.innerHeight)`.
|
|
3047
|
+
It is read on every measurement (open, scroll, resize), so a moving column is followed.
|
|
3048
|
+
Works inline and `teleported`. Without it nothing changes.
|
|
3049
|
+
|
|
2810
3050
|
### Slots
|
|
2811
3051
|
|
|
2812
3052
|
| Slot | Description |
|
package/llms.txt
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
- DsContactCell (Contact data): The typed contact-data cell of the contract (§3.5): the group's **primary** value, the `A+`
|
|
12
12
|
- DsContactList (Contact data): The rows of **one** contact-data group — a popover variant (Work emails, Direct emails,
|
|
13
13
|
- DsContactPlaceholder (Contact data): The row a contact-data group shows when it has no rows to show — the non-data rows of the
|
|
14
|
-
- DsDeliverabilityBadge (Contact data): The
|
|
14
|
+
- DsDeliverabilityBadge (Contact data): The verification badge. By default (§3.3, «modelo Lusha») a bare green `A+` superscript with
|
|
15
|
+
- DsEmailEditor (Contact data): The **«Edit emails» form** of a contact: a header (title, optional back and close), one input per
|
|
15
16
|
- DsMaskedValue (Contact data): An email or phone string with the contract's two-tone treatment when the **server** masked
|
|
16
17
|
- DsMoreCountChip (Contact data): The `+N` overflow chip of a contact-data cell (contract §3.5): always a circular chip,
|
|
17
18
|
- DsOrganizerForm (Contact data): The in-panel **create / edit form** of the organizers (folders, tags): a back row with the title,
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
- DsAvatar (Core): Contact/user avatar: an image, generated initials with a deterministic color hash, or an
|
|
22
23
|
- DsBadge (Core): Solid, white-text pill for value types and counts (e.g. "Work", "New"). **Presentational
|
|
23
24
|
- DsButton (Core): Standard clickable control with the DS variant/size vocabulary, plus icon-only
|
|
25
|
+
- DsIcon (Core): A Material Symbols icon drawn as inline SVG, with the font axes fixed by size. **Presentational
|
|
24
26
|
- DsSpinner (Core): Indeterminate loading indicator — a circular SVG spinner. **Presentational only**: no
|
|
25
27
|
- DsTag (Core): Small bordered chip with an optional × close control. **Presentational only**: `close`
|
|
26
28
|
- DsCell (Data): A single `<td>` cell in the `DsTable` compound API. **Presentational only**: no props
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesql/sql_components_vue3",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "Librería de componentes Vue 3 (SalesQL)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -15,11 +15,18 @@
|
|
|
15
15
|
"./dist/style.css": "./dist/sql_components_vue3.css",
|
|
16
16
|
"./dist/reset.css": "./dist/reset.css"
|
|
17
17
|
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"salesql-icons": "./scripts/generate-icons.mjs"
|
|
20
|
+
},
|
|
18
21
|
"files": [
|
|
19
22
|
"dist",
|
|
20
23
|
"README.md",
|
|
21
24
|
"llms.txt",
|
|
22
|
-
"llms-full.txt"
|
|
25
|
+
"llms-full.txt",
|
|
26
|
+
"src/icons/NOTICE",
|
|
27
|
+
"src/icons/manifest.json",
|
|
28
|
+
"scripts/generate-icons.mjs",
|
|
29
|
+
"scripts/icons-svg.mjs"
|
|
23
30
|
],
|
|
24
31
|
"sideEffects": [
|
|
25
32
|
"**/*.css",
|
|
@@ -64,6 +71,7 @@
|
|
|
64
71
|
"build": "pnpm docs:generate && vite build && vue-tsc -p tsconfig.build.json --emitDeclarationOnly && tsc-alias -p tsconfig.build.json",
|
|
65
72
|
"check:dts": "node build/checkNoAliasInDts.mjs",
|
|
66
73
|
"docs:generate": "node scripts/generate-llms-docs.mjs",
|
|
74
|
+
"icons:generate": "node scripts/generate-icons.mjs",
|
|
67
75
|
"dev:link": "vite build --watch",
|
|
68
76
|
"stories": "histoire dev",
|
|
69
77
|
"build:stories": "histoire build",
|