@salesql/sql_components_vue3 3.26.0 → 3.27.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.
@@ -8,14 +8,14 @@ declare var __VLS_9: {
8
8
  open: boolean;
9
9
  toggle: typeof toggle;
10
10
  disabled: boolean;
11
- }, __VLS_57: {
11
+ }, __VLS_58: {
12
12
  query: string;
13
13
  openCreateForm: typeof openCreateForm;
14
14
  };
15
15
  type __VLS_Slots = {} & {
16
16
  trigger?: (props: typeof __VLS_9) => any;
17
17
  } & {
18
- footer?: (props: typeof __VLS_57) => any;
18
+ footer?: (props: typeof __VLS_58) => any;
19
19
  };
20
20
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
21
21
  label: {
@@ -76,6 +76,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
76
76
  type: PropType<readonly string[]>;
77
77
  default: () => never[];
78
78
  };
79
+ defaultColor: {
80
+ type: StringConstructor;
81
+ default: string;
82
+ };
79
83
  formLoading: {
80
84
  type: BooleanConstructor;
81
85
  default: boolean;
@@ -160,6 +164,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
160
164
  "create-option": (...args: any[]) => void;
161
165
  "update-option": (...args: any[]) => void;
162
166
  "form-close": (...args: any[]) => void;
167
+ "row-actions-open": (...args: any[]) => void;
163
168
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
164
169
  label: {
165
170
  type: StringConstructor;
@@ -219,6 +224,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
219
224
  type: PropType<readonly string[]>;
220
225
  default: () => never[];
221
226
  };
227
+ defaultColor: {
228
+ type: StringConstructor;
229
+ default: string;
230
+ };
222
231
  formLoading: {
223
232
  type: BooleanConstructor;
224
233
  default: boolean;
@@ -301,6 +310,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
301
310
  "onCreate-option"?: ((...args: any[]) => any) | undefined;
302
311
  "onUpdate-option"?: ((...args: any[]) => any) | undefined;
303
312
  "onForm-close"?: ((...args: any[]) => any) | undefined;
313
+ "onRow-actions-open"?: ((...args: any[]) => any) | undefined;
304
314
  }>, {
305
315
  size: DsPickerSize;
306
316
  copy: Partial<DsSavedButtonCopy>;
@@ -327,6 +337,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
327
337
  tooltipPlacement: DsTooltipPlacement;
328
338
  align: DsPickerAlign;
329
339
  rowActions: boolean | DsPickerRowActionsMode;
340
+ defaultColor: string;
330
341
  formLoading: boolean;
331
342
  formError: string;
332
343
  createSubmitLabel: string;
@@ -47,7 +47,9 @@ export interface DsTagPickerProps {
47
47
  rowActions?: DsPickerRowActionsMode | boolean;
48
48
  /** Swatches (hex) of the in-panel form. Only the palette: it gates nothing by itself. */
49
49
  colors?: readonly string[];
50
- /** The app is saving the form: its submit button shows the spinner and is blocked. */
50
+ /** Swatch the create form (and Edit of a tag without colour) starts at. Empty (default) = the first of `colors`. */
51
+ defaultColor?: string;
52
+ /** The app is saving the form: its submit button shows the spinner and is blocked. On success it calls `closeForm(created)` on the picker's instance: with the tag it just created (multiple selection), that tag enters the working copy checked and Apply keeps it even if `options` does not carry it yet. */
51
53
  formLoading?: boolean;
52
54
  /** A failed save, shown under the name field. */
53
55
  formError?: string;
@@ -2,6 +2,7 @@ import { type PropType } from 'vue';
2
2
  import { type DsPickerAlign, type DsPickerCreateMode, type DsPickerOption, type DsPickerRowActionsMode, type DsPickerSize } from '../../constants/pickers';
3
3
  import { type DsTagPickerCopy, type DsTagPickerSelection } from './DsTagPicker.types';
4
4
  declare function toggle(): void;
5
+ declare function closeForm(created?: DsPickerOption): void;
5
6
  declare var __VLS_9: {
6
7
  open: boolean;
7
8
  toggle: typeof toggle;
@@ -61,6 +62,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
61
62
  type: PropType<readonly string[]>;
62
63
  default: () => never[];
63
64
  };
65
+ defaultColor: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
64
69
  formLoading: {
65
70
  type: BooleanConstructor;
66
71
  default: boolean;
@@ -146,7 +151,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
146
151
  default: undefined;
147
152
  };
148
153
  }>, {
149
- closeForm: () => void;
154
+ closeForm: typeof closeForm;
150
155
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
151
156
  search: (...args: any[]) => void;
152
157
  edit: (...args: any[]) => void;
@@ -157,6 +162,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
157
162
  "create-option": (...args: any[]) => void;
158
163
  "update-option": (...args: any[]) => void;
159
164
  "form-close": (...args: any[]) => void;
165
+ "row-actions-open": (...args: any[]) => void;
160
166
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
161
167
  label: {
162
168
  type: StringConstructor;
@@ -208,6 +214,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
208
214
  type: PropType<readonly string[]>;
209
215
  default: () => never[];
210
216
  };
217
+ defaultColor: {
218
+ type: StringConstructor;
219
+ default: string;
220
+ };
211
221
  formLoading: {
212
222
  type: BooleanConstructor;
213
223
  default: boolean;
@@ -302,6 +312,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
302
312
  "onCreate-option"?: ((...args: any[]) => any) | undefined;
303
313
  "onUpdate-option"?: ((...args: any[]) => any) | undefined;
304
314
  "onForm-close"?: ((...args: any[]) => any) | undefined;
315
+ "onRow-actions-open"?: ((...args: any[]) => any) | undefined;
305
316
  }>, {
306
317
  size: DsPickerSize;
307
318
  copy: Partial<DsTagPickerCopy>;
@@ -325,6 +336,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
325
336
  editFormTitle: string;
326
337
  align: DsPickerAlign;
327
338
  rowActions: boolean | DsPickerRowActionsMode;
339
+ defaultColor: string;
328
340
  formLoading: boolean;
329
341
  formError: string;
330
342
  createSubmitLabel: string;
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v3.26.0)
1
+ # @salesql/sql_components_vue3 — SalesQL Design System (v3.27.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
 
@@ -1230,6 +1230,7 @@ The component never persists anything and never guesses that a save worked: it e
1230
1230
  | `create` | `'none' \| 'event' \| 'form'` | `'none'` | What the footer does. `DS_PICKER_CREATE_MODES`. |
1231
1231
  | `rowActions` | `'none' \| 'event' \| 'form'` | `'none'` | The ⋮ menu on each row. `DS_PICKER_ROW_ACTIONS`. |
1232
1232
  | `colors` | `string[]` | `[]` | Swatches (hex) of the form. Only the palette; required by the `'form'` modes. |
1233
+ | `defaultColor` | `string` | `''` | Swatch the create form (and Edit of a folder without colour) starts at. Empty = the first of `colors`. |
1233
1234
  | `formLoading` | `boolean` | `false` | The app is saving: the form's submit shows the spinner and is blocked. |
1234
1235
  | `formError` | `string` | `''` | A failed save, shown under the name field. Clear it on `form-close`: an error left over from a dismissed form is not shown when it reopens. |
1235
1236
  | `copy` | `Partial<DsSavedButtonCopy>` | `{}` | Every string, merged over `DS_SAVED_BUTTON_COPY`. See below. |
@@ -1261,17 +1262,18 @@ or a `footer` slot) with `colors` = `'form'`, without = `'event'`, no footer = `
1261
1262
 
1262
1263
  ### Events
1263
1264
 
1264
- | Event | Payload | When |
1265
- | --------------- | --------------------- | -------------------------------------------------------------------------------------------------------- |
1266
- | `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here. |
1267
- | `create` | `string` | The footer was clicked with `create="event"`; payload is the search text typed so far. The panel closes. |
1268
- | `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
1269
- | `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
1270
- | `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
1271
- | `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
1272
- | `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
1273
- | `search` | `string` | The search text changed (filtering is local). |
1274
- | `update:open` | `boolean` | The panel opened or closed. |
1265
+ | Event | Payload | When |
1266
+ | ------------------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1267
+ | `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here. |
1268
+ | `create` | `string` | The footer was clicked with `create="event"`; payload is the search text typed so far. The panel closes. |
1269
+ | `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
1270
+ | `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
1271
+ | `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
1272
+ | `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
1273
+ | `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
1274
+ | `row-actions-open` | `DsPickerOption` | A row's ⋮ menu opened. Update that option's `deleteDisabled` if Delete should be blocked (`{ hint, tooltip? }`: the item stays focusable, `aria-disabled`, with the hint after its label). |
1275
+ | `search` | `string` | The search text changed (filtering is local). |
1276
+ | `update:open` | `boolean` | The panel opened or closed. |
1275
1277
 
1276
1278
  ### Exposed
1277
1279
 
@@ -1356,8 +1358,14 @@ supplies the palette.
1356
1358
  The component never persists anything and never guesses that a save worked: it emits intent
1357
1359
  (`create-option`, `update-option`, `delete`), and the app saves, then calls the exposed
1358
1360
  `closeForm()` (or sets `formError`). While it saves, `formLoading` blocks the submit. Going to the
1359
- form and back keeps the search and the working-copy selection; the picker never selects the tag it
1360
- created — the app decides.
1361
+ form and back keeps the search and the working-copy selection. A tag the app just created is
1362
+ checked only if the app says so: `closeForm(created)` adds it to the working copy, and Apply keeps
1363
+ it even when `options` does not carry it yet.
1364
+
1365
+ A row's Delete can be blocked with its reason: set `deleteDisabled: { hint, tooltip? }` on the
1366
+ option. The item stays focusable (`aria-disabled`), shows the `hint` after its label and the
1367
+ `tooltip` on hover / focus. `row-actions-open` fires each time a ⋮ menu opens, so the app can check
1368
+ what Delete needs and update the option while the menu is open.
1361
1369
 
1362
1370
  ### Rules
1363
1371
 
@@ -1373,23 +1381,24 @@ created — the app decides.
1373
1381
 
1374
1382
  ### Props
1375
1383
 
1376
- | Prop | Type | Default | Description |
1377
- | ------------- | ----------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1378
- | `label` | `string` | — | Trigger label while untagged ("Tag") (required). |
1379
- | `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
1380
- | `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
1381
- | `size` | `'medium' \| 'large'` | `'medium'` | |
1382
- | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
1383
- | `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
1384
- | `disabled` | `boolean` | `false` | |
1385
- | `selection` | `'multiple' \| 'single'` | `'multiple'` | `single`: at most one tag (the extension's header). Radio rows; picking applies at once and closes (so does the `create="event"` row); «Remove tag» (`copy.removeTag`) applies `[]`. No Apply. A pick emits `[option]` alone: other applied tags are not kept. `DS_TAG_PICKER_SELECTIONS`. |
1386
- | `teleported` | `boolean` | `false` | Render the picker panel in `<body>` (or the app's `DS_TELEPORT_TARGET`), so a scroll container doesn't clip it. |
1387
- | `create` | `'none' \| 'event' \| 'form'` | `'none'` | What the create affordance does. `DS_PICKER_CREATE_MODES`. |
1388
- | `rowActions` | `'none' \| 'event' \| 'form'` | `'none'` | The ⋮ menu on each row. `DS_PICKER_ROW_ACTIONS`. |
1389
- | `colors` | `string[]` | `[]` | Swatches (hex) of the form. Only the palette; required by the `'form'` modes. |
1390
- | `formLoading` | `boolean` | `false` | The app is saving: the form's submit shows the spinner and is blocked. |
1391
- | `formError` | `string` | `''` | A failed save, shown under the name field. Clear it on `form-close`: an error left over from a dismissed form is not shown on reopen. |
1392
- | `copy` | `Partial<DsTagPickerCopy>` | `{}` | Every string, merged over `DS_TAG_PICKER_COPY`. See below. |
1384
+ | Prop | Type | Default | Description |
1385
+ | -------------- | ----------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1386
+ | `label` | `string` | — | Trigger label while untagged ("Tag") (required). |
1387
+ | `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
1388
+ | `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
1389
+ | `size` | `'medium' \| 'large'` | `'medium'` | |
1390
+ | `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
1391
+ | `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
1392
+ | `disabled` | `boolean` | `false` | |
1393
+ | `selection` | `'multiple' \| 'single'` | `'multiple'` | `single`: at most one tag (the extension's header). Radio rows; picking applies at once and closes (so does the `create="event"` row); «Remove tag» (`copy.removeTag`) applies `[]`. No Apply. A pick emits `[option]` alone: other applied tags are not kept. `DS_TAG_PICKER_SELECTIONS`. |
1394
+ | `teleported` | `boolean` | `false` | Render the picker panel in `<body>` (or the app's `DS_TELEPORT_TARGET`), so a scroll container doesn't clip it. |
1395
+ | `create` | `'none' \| 'event' \| 'form'` | `'none'` | What the create affordance does. `DS_PICKER_CREATE_MODES`. |
1396
+ | `rowActions` | `'none' \| 'event' \| 'form'` | `'none'` | The ⋮ menu on each row. `DS_PICKER_ROW_ACTIONS`. |
1397
+ | `colors` | `string[]` | `[]` | Swatches (hex) of the form. Only the palette; required by the `'form'` modes. |
1398
+ | `defaultColor` | `string` | `''` | Swatch the create form (and Edit of a tag without colour) starts at. Empty = the first of `colors`. |
1399
+ | `formLoading` | `boolean` | `false` | The app is saving: the form's submit shows the spinner and is blocked. |
1400
+ | `formError` | `string` | `''` | A failed save, shown under the name field. Clear it on `form-close`: an error left over from a dismissed form is not shown on reopen. |
1401
+ | `copy` | `Partial<DsTagPickerCopy>` | `{}` | Every string, merged over `DS_TAG_PICKER_COPY`. See below. |
1393
1402
 
1394
1403
  `DsTagPickerCopy` keys (English defaults): `taggedAs` (`'Tagged as'`), `apply` (`'Apply'`),
1395
1404
  `searchPlaceholder` (`'Search tags'`), `empty` (`'No tags found'`, empty string = nothing), `more`
@@ -1421,23 +1430,24 @@ always wins over its alias. When `create` is not set it is inferred as before: `
1421
1430
 
1422
1431
  ### Events
1423
1432
 
1424
- | Event | Payload | When |
1425
- | --------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
1426
- | `apply` | `DsPickerOption[]` | Apply clicked: the full new selection, in `options` order. Panel closes. With `selection="single"`: `[picked]` on pick, `[]` on «Remove tag». |
1427
- | `create` | `string` | The create row was clicked with `create="event"`; payload is the typed text. |
1428
- | `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
1429
- | `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
1430
- | `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
1431
- | `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
1432
- | `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
1433
- | `search` | `string` | The search text changed (filtering is local). |
1434
- | `update:open` | `boolean` | The panel opened or closed. |
1433
+ | Event | Payload | When |
1434
+ | ------------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
1435
+ | `apply` | `DsPickerOption[]` | Apply clicked: the full new selection, in `options` order. Panel closes. With `selection="single"`: `[picked]` on pick, `[]` on «Remove tag». |
1436
+ | `create` | `string` | The create row was clicked with `create="event"`; payload is the typed text. |
1437
+ | `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
1438
+ | `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
1439
+ | `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
1440
+ | `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
1441
+ | `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
1442
+ | `row-actions-open` | `DsPickerOption` | A row's ⋮ menu opened. Update that option's `deleteDisabled` if Delete should be blocked. |
1443
+ | `search` | `string` | The search text changed (filtering is local). |
1444
+ | `update:open` | `boolean` | The panel opened or closed. |
1435
1445
 
1436
1446
  ### Exposed
1437
1447
 
1438
- | Member | Description |
1439
- | ------------- | ------------------------------------------------------------------------------------------------------------- |
1440
- | `closeForm()` | Returns the panel to the list. Call it once the save succeeded. Closing the panel also resets it to the list. |
1448
+ | Member | Description |
1449
+ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1450
+ | `closeForm(created?)` | Returns the panel to the list. Call it once the save succeeded. With the tag just created (create form, `selection="multiple"`) that tag enters the selection checked. Closing the panel also resets it to the list. |
1441
1451
 
1442
1452
  ### Slots
1443
1453
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesql/sql_components_vue3",
3
- "version": "3.26.0",
3
+ "version": "3.27.0",
4
4
  "description": "Librería de componentes Vue 3 (SalesQL)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",