@salesql/sql_components_vue3 3.35.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;
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @salesql/sql_components_vue3 — SalesQL Design System (v3.35.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
 
@@ -4308,7 +4308,12 @@ actions, the safe one (secondary) and the primary one. Built for «Keep in curre
4308
4308
  - **Two ways to say no:** the secondary emits `cancel` with `'action'` (the user chose the safe
4309
4309
  option); Esc, the X and the backdrop emit `cancel` with `'dismiss'` (the user walked away).
4310
4310
  `DS_CONFIRM_DIALOG_CANCEL_REASONS`.
4311
- - **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'`.
4312
4317
  - **`loading`:** the primary spins, both actions are disabled and Esc, the X and the backdrop
4313
4318
  emit nothing until the app clears it. The focus waits on the dialog itself (not on a disabled
4314
4319
  action, nor on the X, which does nothing meanwhile), also when it opens already loading, and
@@ -4321,16 +4326,17 @@ actions, the safe one (secondary) and the primary one. Built for «Keep in curre
4321
4326
 
4322
4327
  ### Props
4323
4328
 
4324
- | Prop | Type | Default | Description |
4325
- | -------------- | --------- | --------- | ----------------------------------------------------------- |
4326
- | `open` | `boolean` | `false` | |
4327
- | `title` | `string` | — | The header (required). |
4328
- | `text` | `string` | `''` | The question. The default slot replaces it. |
4329
- | `notice` | `string` | `''` | A secondary line under the text (stale data). Empty = none. |
4330
- | `confirmLabel` | `string` | — | The primary action (required); emits `confirm`. |
4331
- | `cancelLabel` | `string` | — | The safe action (required); emits `cancel` with `'action'`. |
4332
- | `closeLabel` | `string` | `'Close'` | Accessible name of the X. |
4333
- | `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. |
4334
4340
 
4335
4341
  ### Events
4336
4342
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesql/sql_components_vue3",
3
- "version": "3.35.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",