@salesql/sql_components_vue3 2.1.1 → 3.1.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/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v2.1.1)
1
+ # @salesql/sql_components_vue3 — SalesQL Design System (v3.1.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,7 +11,7 @@ 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
- ## Components (30)
14
+ ## Components (32)
15
15
 
16
16
  - **DsAvatar** (Core) — Contact/user avatar: an image, generated initials with a deterministic color hash, or an
17
17
  - **DsBadge** (Core) — Solid, white-text pill for value types and counts (e.g. "Work", "New"). **Presentational
@@ -43,6 +43,8 @@ All components are named exports with the `Ds` prefix. Variant constants and Typ
43
43
  - **DsTextarea** (Forms) — Multi-line text field — the DS "Textarea", sibling of `DsInput` with the same
44
44
  - **DsMenuItem** (Navigation) — Sidebar navigation row: an icon with an optional label, usable full-width or collapsed to
45
45
  - **DsWizardStepper** (Navigation) — Numbered multi-step flow: a row of step chips (completed / active / incomplete / neutral)
46
+ - **DsDrawer** (Overlays) — Side panel over a backdrop. Built **native** — no `element-plus` — so the Vue 2 twin
47
+ - **DsPopover** (Overlays) — Click-triggered card panel anchored to a trigger. Built **native** — no `element-plus`,
46
48
 
47
49
  ---
48
50
  <!-- DsAvatar · Core -->
@@ -1348,3 +1350,166 @@ the current step (`value`) and the button copy.
1348
1350
  user needs to see progress and jump back to prior steps.
1349
1351
  - For a non-linear sidebar/rail instead, use `DsMenuItem`; for an unlabeled
1350
1352
  percentage/quota breakdown use `DsSegmentedProgressBar`.
1353
+
1354
+ ---
1355
+
1356
+ <!-- DsDrawer · Overlays -->
1357
+
1358
+ ## DsDrawer
1359
+
1360
+ Side panel over a backdrop. Built **native** — no `element-plus` — so the Vue 2 twin
1361
+ (`@salesql/sql_components`, for `front` and `extension-lite`) can replicate the same API
1362
+ and markup; Element Plus is Vue 3 only (SALESQL-3968).
1363
+
1364
+ Everything `el-drawer` used to give for free is carried here: portal to `body`, backdrop,
1365
+ enter/leave transition, Escape, body scroll lock, **focus trap + focus restoration**,
1366
+ cancelable `before-close`, and an edge dragger clamped **during** the drag.
1367
+
1368
+ **Presentational only**: it never closes itself — the consumer holds `open` and flips it
1369
+ off on `close`. It never stores a width either — it clamps and emits; persisting is the
1370
+ consumer's job (frontend-app's `usePersistedWidth`).
1371
+
1372
+ ### Props
1373
+
1374
+ | Prop | Type | Default | Description |
1375
+ | ---------------- | ----------------------- | --------- | --------------------------------------------------------------------------------- |
1376
+ | `open` | `boolean` | `false` | Controls visibility. |
1377
+ | `title` | `string` | `''` | Header text; shows the header row (with `showClose`). |
1378
+ | `showClose` | `boolean` | `true` | Show the icon-only × close button. |
1379
+ | `closeLabel` | `string` | `'Close'` | `aria-label` for the × button. |
1380
+ | `direction` | `'rtl' \| 'ltr'` | `'rtl'` | Edge the panel is pinned to. `rtl` = right (ring on its left border). |
1381
+ | `width` | `number` | `440` | Panel width in **px**. 440 is the frozen contract's value (SALESQL-3548). |
1382
+ | `resizable` | `boolean` | `false` | Enable the edge dragger. |
1383
+ | `minWidth` | `number` | `360` | Lower bound, enforced **during** the drag. |
1384
+ | `maxWidth` | `number` | `720` | Upper bound, enforced **during** the drag. |
1385
+ | `closeOnOverlay` | `boolean` | `true` | Clicking the backdrop requests a close. |
1386
+ | `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
1387
+ | `beforeClose` | `() => boolean \| void` | `null` | Return `false` (or a promise of it) to **cancel** the close — gates every path. |
1388
+ | `fixed` | `boolean` | `true` | `false` renders in-flow (no portal / backdrop / scroll lock), for specimen cards. |
1389
+
1390
+ ### Slots
1391
+
1392
+ | Slot | Description |
1393
+ | -------- | -------------------------------------------------------- |
1394
+ | default | Panel body. |
1395
+ | `header` | Replaces the default title element (the × button stays). |
1396
+ | `footer` | Optional action row; omitted entirely when not provided. |
1397
+
1398
+ ### Events
1399
+
1400
+ | Event | Payload | When |
1401
+ | -------------- | --------------- | -------------------------------------------------------------------- |
1402
+ | `close` | — | ×, backdrop or Escape — **after** `beforeClose` allowed it. |
1403
+ | `resize-start` | `width: number` | Drag began. |
1404
+ | `resize` | `width: number` | Every move while dragging, already clamped to `minWidth`/`maxWidth`. |
1405
+ | `resize-end` | `width: number` | Drag released, final clamped width. |
1406
+
1407
+ A consumer that only wants to store the result listens to `resize-end` alone:
1408
+
1409
+ ```vue
1410
+ <DsDrawer :width="width" resizable :min-width="360" :max-width="720" @resize-end="setWidth" />
1411
+ ```
1412
+
1413
+ ### Accessibility
1414
+
1415
+ - `role="dialog"` + `aria-modal="true"` in portal mode.
1416
+ - `aria-labelledby` points at the visible title; a custom `#header` falls back to
1417
+ `aria-label="drawer"` rather than referencing a node that no longer exists.
1418
+ - **Focus trap**: Tab from the last control returns to the first, Shift+Tab from the first
1419
+ goes to the last, and with nothing focusable inside, Tab cannot reach the page behind
1420
+ the overlay. Focus moves into the panel on open and **restores to the opener** on close.
1421
+ - Body scroll locks while a fixed/open drawer is mounted.
1422
+ - The dragger is `aria-hidden` — it is a pointer affordance, not a control to land on.
1423
+
1424
+ ### Chrome
1425
+
1426
+ **Header — from the DS, not from the app.** 48px tall, title left-aligned at body size and
1427
+ bold (`slate-main`), truncating with an ellipsis, `slate-tint` hairline underneath, and the
1428
+ control cluster at the trailing edge.
1429
+
1430
+ frontend-app's `el-drawer.scss` override had drifted from the DS on five counts — 50px,
1431
+ centred title, 16px, a 24px inset and `slate-shadow`. `DESIGN-SYSTEM.md` makes the DS the
1432
+ only style authority and forbids taking values from a consuming app, so the DS wins:
1433
+ **the full profile will look different once it adopts this**, by design.
1434
+
1435
+ Residual deltas, reconciled onto the 8px grid instead of copied off-grid: the DS's
1436
+ `0 14px 0 16px` inset becomes a symmetric 16px, and its 10px gap becomes 12px.
1437
+
1438
+ **Header controls.** The close is a bare glyph (20px, `slate-main`) with **no hover
1439
+ surface** — it is a plain icon in the DS, not a filled button. It stays a real `<button>`
1440
+ with an `aria-label` and a focus-visible ring, which the DS's `<span onClick>` is not.
1441
+ `#actions` renders before it in the softer `slate-soft`, glyphs at 18px.
1442
+
1443
+ **Surfaces.** The panel is the grey surface (`slate-bg`) and the chrome bars — header and
1444
+ footer — paint white on top of it. The body paints nothing and shows the grey through,
1445
+ with a 16px inset. That is why the drawer needs neither an inner wrapper nor a background
1446
+ prop: the DS answers it structurally, and a colour prop would be a style escape hatch the
1447
+ DS never defines. The footer's white is the one inferred value here — the DS full profile
1448
+ has no footer, and white matches the header as the other chrome bar.
1449
+
1450
+ **Edge.** A **1px grey ring** on the opening edge. The dragger's rule is `slate-mid` on
1451
+ hover and while dragging — **grey in every state**. Element Plus painted it with
1452
+ `--el-color-primary` (the lavender accent); that is the bug this component inherits
1453
+ already fixed.
1454
+
1455
+ ---
1456
+
1457
+ <!-- DsPopover · Overlays -->
1458
+
1459
+ ## DsPopover
1460
+
1461
+ Click-triggered card panel anchored to a trigger. Built **native** — no `element-plus`,
1462
+ no `floating-ui` — for the same reason as `DsDrawer`: the Vue 2 twin has to replicate this
1463
+ API and markup, and Element Plus is Vue 3 only (SALESQL-3968).
1464
+
1465
+ 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, 4-way, like
1467
+ `DsTooltip`.
1468
+
1469
+ **Presentational only**: it never closes itself — it asks the consumer through
1470
+ `v-model:open`.
1471
+
1472
+ ### Props
1473
+
1474
+ | Prop | Type | Default | Description |
1475
+ | ---------------- | ---------------------------------------- | ---------- | ------------------------------------------------------------- |
1476
+ | `open` | `boolean` | `false` | Visibility. Pair with `v-model:open`. |
1477
+ | `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | Side of the trigger the panel opens on. |
1478
+ | `width` | `string` | `''` | Panel width (any CSS length). Empty = fit content. |
1479
+ | `closeOnEscape` | `boolean` | `true` | Escape requests a close. |
1480
+ | `closeOnOutside` | `boolean` | `true` | A press outside the trigger and panel requests a close. |
1481
+ | `triggerOnClick` | `boolean` | `true` | Let the trigger slot toggle the panel. Off = consumer-driven. |
1482
+
1483
+ ### Slots
1484
+
1485
+ | Slot | Description |
1486
+ | --------- | --------------------------------- |
1487
+ | `trigger` | The element the panel anchors to. |
1488
+ | default | Panel content. |
1489
+
1490
+ ### Events
1491
+
1492
+ | Event | Payload | When |
1493
+ | ------------- | --------- | ----------------------------------------------------------- |
1494
+ | `update:open` | `boolean` | Trigger clicked, Escape pressed, or a press landed outside. |
1495
+
1496
+ ```vue
1497
+ <DsPopover v-model:open="open" width="260px">
1498
+ <template #trigger><DsButton variant="tertiary">Stripe</DsButton></template>
1499
+ <CompanyCard :company="company" />
1500
+ </DsPopover>
1501
+ ```
1502
+
1503
+ ### Accessibility
1504
+
1505
+ - `role="dialog"` on the panel; it takes focus on open and **returns focus to the trigger**
1506
+ on close, so a keyboard user is never dumped at the top of the document.
1507
+ - Escape closes when `closeOnEscape` is true.
1508
+ - Outside dismissal listens on `mousedown`, so a press that starts outside dismisses the
1509
+ panel even if the pointer is released over it.
1510
+
1511
+ ### Chrome
1512
+
1513
+ **1px grey ring** (`slate-tint`), `spacing(1)` (8px) padding, card radius and the dropdown
1514
+ shadow — the values carried over from the `.el-popper.card-popover` override. Grey, never
1515
+ the accent.
package/llms.txt CHANGED
@@ -34,6 +34,8 @@
34
34
  - DsTextarea (Forms): Multi-line text field — the DS "Textarea", sibling of `DsInput` with the same
35
35
  - DsMenuItem (Navigation): Sidebar navigation row: an icon with an optional label, usable full-width or collapsed to
36
36
  - DsWizardStepper (Navigation): Numbered multi-step flow: a row of step chips (completed / active / incomplete / neutral)
37
+ - DsDrawer (Overlays): Side panel over a backdrop. Built **native** — no `element-plus` — so the Vue 2 twin
38
+ - DsPopover (Overlays): Click-triggered card panel anchored to a trigger. Built **native** — no `element-plus`,
37
39
 
38
40
  ## Full documentation
39
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesql/sql_components_vue3",
3
- "version": "2.1.1",
3
+ "version": "3.1.0",
4
4
  "description": "Librería de componentes Vue 3 (SalesQL)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -12,7 +12,8 @@
12
12
  "import": "./dist/index.es.js",
13
13
  "require": "./dist/index.cjs"
14
14
  },
15
- "./dist/style.css": "./dist/sql_components_vue3.css"
15
+ "./dist/style.css": "./dist/sql_components_vue3.css",
16
+ "./dist/reset.css": "./dist/reset.css"
16
17
  },
17
18
  "files": [
18
19
  "dist",