@salesql/sql_components_vue3 3.34.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,9 @@
1
+ /** The primary action's look: the regular CTA, or `danger` for a destructive one. */
2
+ export declare const DS_CONFIRM_DIALOG_CONFIRM_VARIANTS: {
3
+ readonly PRIMARY: "primary";
4
+ readonly DANGER: "danger";
5
+ };
6
+ export type DsConfirmDialogConfirmVariant = (typeof DS_CONFIRM_DIALOG_CONFIRM_VARIANTS)[keyof typeof DS_CONFIRM_DIALOG_CONFIRM_VARIANTS];
1
7
  export declare const DS_CONFIRM_DIALOG_CANCEL_REASONS: {
2
8
  /** The secondary button. */
3
9
  readonly ACTION: "action";
@@ -15,8 +21,13 @@ export interface DsConfirmDialogProps {
15
21
  notice?: string;
16
22
  /** The primary action («Move to new folder»); emits `confirm`. */
17
23
  confirmLabel: string;
18
- /** The safe action («Keep in current folder»); emits `cancel` with `action`. Gets the focus on open. */
19
- cancelLabel: string;
24
+ /** The primary action's look (`DS_CONFIRM_DIALOG_CONFIRM_VARIANTS`). Default `primary`. */
25
+ confirmVariant?: DsConfirmDialogConfirmVariant;
26
+ /**
27
+ * The safe action («Keep in current folder»); emits `cancel` with `action`. Gets the focus on
28
+ * open. Empty = no cancel action (a notice): the primary gets the focus instead.
29
+ */
30
+ cancelLabel?: string;
20
31
  /** Accessible name of the dialog's X. */
21
32
  closeLabel?: string;
22
33
  /** The app is acting on the answer: the primary shows its spinner and every path is blocked. */
@@ -1,4 +1,5 @@
1
- import { type DsConfirmDialogCancelReason } from './DsConfirmDialog.types';
1
+ import { type PropType } from 'vue';
2
+ import { type DsConfirmDialogCancelReason, type DsConfirmDialogConfirmVariant } from './DsConfirmDialog.types';
2
3
  declare var __VLS_10: {};
3
4
  type __VLS_Slots = {} & {
4
5
  default?: (props: typeof __VLS_10) => any;
@@ -24,9 +25,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
24
25
  type: StringConstructor;
25
26
  required: true;
26
27
  };
28
+ confirmVariant: {
29
+ type: PropType<DsConfirmDialogConfirmVariant>;
30
+ default: "primary";
31
+ validator: (value: string) => boolean;
32
+ };
27
33
  cancelLabel: {
28
34
  type: StringConstructor;
29
- required: true;
35
+ default: string;
30
36
  };
31
37
  closeLabel: {
32
38
  type: StringConstructor;
@@ -60,9 +66,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
60
66
  type: StringConstructor;
61
67
  required: true;
62
68
  };
69
+ confirmVariant: {
70
+ type: PropType<DsConfirmDialogConfirmVariant>;
71
+ default: "primary";
72
+ validator: (value: string) => boolean;
73
+ };
63
74
  cancelLabel: {
64
75
  type: StringConstructor;
65
- required: true;
76
+ default: string;
66
77
  };
67
78
  closeLabel: {
68
79
  type: StringConstructor;
@@ -80,7 +91,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
80
91
  open: boolean;
81
92
  loading: boolean;
82
93
  closeLabel: string;
94
+ cancelLabel: string;
83
95
  notice: string;
96
+ confirmVariant: DsConfirmDialogConfirmVariant;
84
97
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
85
98
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
86
99
  export default _default;
@@ -18,11 +18,19 @@ export interface DsTagPickerCopy extends DsPickerOrganizerCopy {
18
18
  removeTag?: string;
19
19
  /** `selection: 'single'` with `selectOnCreate`: the create form's submit, which also picks the new tag («Create & select»). Unset, an explicit `createSubmit` wins over the English default. Optional, like `removeTag`. */
20
20
  createSelectSubmit?: string;
21
+ /** `iconOnly`: the tooltip text from every applied tag's name. Default: comma-separated. Optional, like `removeTag`. */
22
+ tagList?: (names: string[]) => string;
23
+ /** `iconOnly`: the line atop the open panel naming every applied tag, for touch (no hover). Optional, like `removeTag`. */
24
+ appliedList?: (names: string[]) => string;
25
+ /** The `+N` chip's name from the overflow (`(n) => \`${n} more tags\``); wins over `more`. Optional, like `removeTag`. */
26
+ formatMore?: (overflow: number) => string;
21
27
  }
22
28
  /** The copy the picker renders: every key it shows resolved. */
23
29
  export type DsTagPickerResolvedCopy = DsTagPickerCopy & {
24
30
  removeTag: string;
25
31
  createSelectSubmit: string;
32
+ tagList: (names: string[]) => string;
33
+ appliedList: (names: string[]) => string;
26
34
  };
27
35
  export declare const DS_TAG_PICKER_COPY: DsTagPickerResolvedCopy;
28
36
  export declare const DS_TAG_PICKER_SELECTIONS: {
@@ -38,6 +46,8 @@ export interface DsTagPickerProps {
38
46
  /** Every tag the user can pick from. */
39
47
  options: DsPickerOption[];
40
48
  size?: DsPickerSize;
49
+ /** Narrow panels: the trigger shows only the glyph (and the `+N` chip), the label stays for screen readers and the tooltip lists every tag (`copy.tagList`) and the open panel names them too (`copy.appliedList`); untagged, the tooltip is `label`. */
50
+ iconOnly?: boolean;
41
51
  /** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's row / profile trigger. */
42
52
  pill?: boolean;
43
53
  align?: DsPickerAlign;
@@ -32,6 +32,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
32
32
  type: BooleanConstructor;
33
33
  default: boolean;
34
34
  };
35
+ iconOnly: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
35
39
  align: {
36
40
  type: PropType<DsPickerAlign>;
37
41
  default: "start";
@@ -189,6 +193,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
189
193
  type: BooleanConstructor;
190
194
  default: boolean;
191
195
  };
196
+ iconOnly: {
197
+ type: BooleanConstructor;
198
+ default: boolean;
199
+ };
192
200
  align: {
193
201
  type: PropType<DsPickerAlign>;
194
202
  default: "start";
@@ -332,6 +340,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
332
340
  editLabel: string;
333
341
  emptyLabel: string;
334
342
  moreLabel: string;
343
+ iconOnly: boolean;
335
344
  searchPlaceholder: string;
336
345
  colors: readonly string[];
337
346
  createLabel: string;
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v3.34.0)
1
+ # @salesql/sql_components_vue3 — SalesQL Design System (v3.36.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
 
@@ -1519,7 +1519,16 @@ what Delete needs and update the option while the menu is open.
1519
1519
  - **Two create texts:** `copy.createRow` is the inline «Create “q”» row and `copy.newButton` is the
1520
1520
  footer «+ New Tag» (only with `create="form"`). The deprecated `createLabel` fed both.
1521
1521
  - **Tooltip:** automatic. The trigger shows the full label only while it is truncated, and hides
1522
- while the panel is open.
1522
+ while the panel is open. With `iconOnly` it is always on (except while the panel is open): every
1523
+ applied tag's name (`copy.tagList`), or `label` while untagged.
1524
+ - **Icon only (narrow panels):** `iconOnly` keeps the `sell` glyph in the first tag's colour and
1525
+ the `+N` chip, and hides «Tagged as …» visually; the text stays for screen readers (the
1526
+ `DsItemSelectorButton` technique). Untagged, only the `label` glyph shows and `label` names it.
1527
+ The glyph is then the only cue, so a tag colour under 3:1 on the trigger (white, or `slate-bg`
1528
+ on hover) gets a 1px `slate-main` outline around the glyph, its colour intact (WCAG 1.4.11):
1529
+ 15 of the 24 `DS_ORGANIZER_COLORS`, the yellow `#FEEE5E` among them.
1530
+ Touch has no hover, so the open panel starts with «Applied: …» (`copy.appliedList`), naming
1531
+ every applied tag, also those missing from `options`.
1523
1532
  - **Copy:** `copy` is partial; the keys it carries override the English defaults
1524
1533
  (`DS_TAG_PICKER_COPY`), the rest stays.
1525
1534
 
@@ -1531,6 +1540,7 @@ what Delete needs and update the option while the menu is open.
1531
1540
  | `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
1532
1541
  | `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
1533
1542
  | `size` | `'medium' \| 'large'` | `'medium'` | |
1543
+ | `iconOnly` | `boolean` | `false` | Narrow panels: the trigger shows only the glyph and the `+N` chip; the label stays for screen readers and the tooltip lists every tag (`copy.tagList`), as does the open panel (`copy.appliedList`). Untagged: the `label` glyph, `label` as tooltip and accessible name. |
1534
1544
  | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
1535
1545
  | `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
1536
1546
  | `disabled` | `boolean` | `false` | |
@@ -1547,14 +1557,17 @@ what Delete needs and update the option while the menu is open.
1547
1557
 
1548
1558
  `DsTagPickerCopy` keys (English defaults): `taggedAs` (`'Tagged as'`), `apply` (`'Apply'`),
1549
1559
  `searchPlaceholder` (`'Search tags'`), `empty` (`'No tags found'`, empty string = nothing), `more`
1550
- (`''`, the `+N` chip's accessible name), `createRow` (`'Create'`), `newButton` (`'New Tag'`),
1560
+ (`''`, the `+N` chip's accessible name), `formatMore` (optional `(n) => string` that gets the
1561
+ overflow and wins over `more`, e.g. `` (n) => `${n} more tags` ``), `createRow` (`'Create'`), `newButton` (`'New Tag'`),
1551
1562
  `actions` (`'Actions'`, the ⋮ `aria-label`), `edit` (`'Edit'`), `delete` (`'Delete'`),
1552
1563
  `deleteConfirm` (`'Are you sure?'`) and `deleteConfirmAction` (`'Yes, delete'`), the row after the
1553
1564
  first click on Delete,
1554
1565
  `createFormTitle` (`'New Tag'`), `editFormTitle` (`'Edit Tag'`), `createSubmit` (`'Create'`),
1555
1566
  `editSubmit` (`'Save'`), `namePlaceholder` (`'Tag name'`), `setColor` (`'Set Color'`), `back`
1556
1567
  (`'Back'`), `removeTag` (`'Remove tag'`, only with `selection="single"`), `createSelectSubmit`
1557
- (`'Create & select'`, the create submit with `selection="single"` and `selectOnCreate`; falls back to an explicit `createSubmit`), `errorMissingName` /
1568
+ (`'Create & select'`, the create submit with `selection="single"` and `selectOnCreate`; falls back to an explicit `createSubmit`), `tagList` (`(names) => names.join(', ')`, the
1569
+ `iconOnly` tooltip from every applied tag's name), `appliedList` (`` (names) => `Applied: ${names.join(', ')}` ``, the
1570
+ `iconOnly` line atop the open panel), `errorMissingName` /
1558
1571
  `errorTooLongName` (the form's own defaults when unset).
1559
1572
 
1560
1573
  Map frontend-app's `Tag` with `{ id: t.id, name: t.name, color: t.color }` — the API takes
@@ -1617,6 +1630,10 @@ aria-expanded>`), so it never toggles the tag. It appears on row hover, on keybo
1617
1630
  is open at a time. It is teleported to `<body>`, so the scrollable list never clips it, and
1618
1631
  pressing inside it does not close the picker (nested `DsPopover`s register with their parent).
1619
1632
  - Back from the form (or `closeForm()`) returns focus to the search field.
1633
+ - With `iconOnly` the trigger is still named by its text («Tagged as {first}», or `label`),
1634
+ hidden visually but read; give the `+N` chip a name with `copy.formatMore` (``(n) => `${n} more tags` ``)
1635
+ so the count is announced too. The tooltip (every tag) is its description; on touch the open
1636
+ panel names every applied tag («Applied: …»).
1620
1637
 
1621
1638
  ### Design parity (export `tagsLine` / `tagMenu`)
1622
1639
 
@@ -4291,7 +4308,12 @@ actions, the safe one (secondary) and the primary one. Built for «Keep in curre
4291
4308
  - **Two ways to say no:** the secondary emits `cancel` with `'action'` (the user chose the safe
4292
4309
  option); Esc, the X and the backdrop emit `cancel` with `'dismiss'` (the user walked away).
4293
4310
  `DS_CONFIRM_DIALOG_CANCEL_REASONS`.
4294
- - **Focus:** on open it lands on the safe action, never on the primary or the X.
4311
+ - **Focus:** on open it lands on the safe action, never on the primary or the X. With no
4312
+ `cancelLabel` (a notice with one action) it lands on the primary.
4313
+ - **Destructive:** `confirmVariant: 'danger'` paints the primary as `DsButton` `danger`
4314
+ (`DS_CONFIRM_DIALOG_CONFIRM_VARIANTS`); the focus still starts on the safe action.
4315
+ - **One action:** without `cancelLabel` there is no secondary; Esc, the X and the backdrop
4316
+ still emit `cancel` with `'dismiss'`.
4295
4317
  - **`loading`:** the primary spins, both actions are disabled and Esc, the X and the backdrop
4296
4318
  emit nothing until the app clears it. The focus waits on the dialog itself (not on a disabled
4297
4319
  action, nor on the X, which does nothing meanwhile), also when it opens already loading, and
@@ -4304,16 +4326,17 @@ actions, the safe one (secondary) and the primary one. Built for «Keep in curre
4304
4326
 
4305
4327
  ### Props
4306
4328
 
4307
- | Prop | Type | Default | Description |
4308
- | -------------- | --------- | --------- | ----------------------------------------------------------- |
4309
- | `open` | `boolean` | `false` | |
4310
- | `title` | `string` | — | The header (required). |
4311
- | `text` | `string` | `''` | The question. The default slot replaces it. |
4312
- | `notice` | `string` | `''` | A secondary line under the text (stale data). Empty = none. |
4313
- | `confirmLabel` | `string` | — | The primary action (required); emits `confirm`. |
4314
- | `cancelLabel` | `string` | — | The safe action (required); emits `cancel` with `'action'`. |
4315
- | `closeLabel` | `string` | `'Close'` | Accessible name of the X. |
4316
- | `loading` | `boolean` | `false` | The app is acting on the answer: every path is blocked. |
4329
+ | Prop | Type | Default | Description |
4330
+ | ---------------- | ----------------------- | ----------- | ------------------------------------------------------------------- |
4331
+ | `open` | `boolean` | `false` | |
4332
+ | `title` | `string` | — | The header (required). |
4333
+ | `text` | `string` | `''` | The question. The default slot replaces it. |
4334
+ | `notice` | `string` | `''` | A secondary line under the text (stale data). Empty = none. |
4335
+ | `confirmLabel` | `string` | — | The primary action (required); emits `confirm`. |
4336
+ | `confirmVariant` | `'primary' \| 'danger'` | `'primary'` | The primary's look; `danger` for a destructive action. |
4337
+ | `cancelLabel` | `string` | `''` | The safe action; emits `cancel` with `'action'`. Empty = no button. |
4338
+ | `closeLabel` | `string` | `'Close'` | Accessible name of the X. |
4339
+ | `loading` | `boolean` | `false` | The app is acting on the answer: every path is blocked. |
4317
4340
 
4318
4341
  ### Events
4319
4342
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesql/sql_components_vue3",
3
- "version": "3.34.0",
3
+ "version": "3.36.0",
4
4
  "description": "Librería de componentes Vue 3 (SalesQL)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",