@salesql/sql_components_vue3 3.13.0 → 3.15.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/usePickerOrganizer.d.ts +36 -0
- package/dist/constants/events.d.ts +2 -0
- package/dist/constants/pickers.d.ts +64 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.es.js +2827 -2592
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsContactCell/DsContactCell.types.d.ts +5 -0
- package/dist/ui/DsContactCell/DsContactCell.vue.d.ts +11 -2
- package/dist/ui/DsNotification/DsNotification.types.d.ts +1 -0
- package/dist/ui/DsNotification/notificationStack.d.ts +2 -0
- package/dist/ui/DsSavedButton/DsSavedButton.story-state.d.ts +29 -0
- package/dist/ui/DsSavedButton/DsSavedButton.types.d.ts +69 -15
- package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +104 -59
- package/dist/ui/DsTagPicker/DsTagPicker.types.d.ts +69 -16
- package/dist/ui/DsTagPicker/DsTagPicker.vue.d.ts +109 -83
- package/llms-full.txt +167 -95
- package/package.json +2 -1
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.15.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
|
|
|
@@ -341,6 +341,7 @@ With `type` set it is also the **full-profile row** (type glyph on the left, §3
|
|
|
341
341
|
| `popoverWidth` | `string` | `'300px'` | Popover width (export `DataPopover`). |
|
|
342
342
|
| `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. |
|
|
343
343
|
| `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). |
|
|
344
|
+
| `revealTooltip` | `string` | `''` | What the CTA costs («1 credit»), shown in a `DsTooltip` to the left of the button. Empty = no tooltip. |
|
|
344
345
|
| `revealing` | `boolean` | `false` | The consumer's reveal is in flight: the CTA spins and ignores clicks. |
|
|
345
346
|
| `leaveDelay` | `number` | `220` | Grace before an unpinned popover closes after the pointer leaves (ms). |
|
|
346
347
|
| `copyLabel` … `incorrectLabel` | `string` | English | Accessible labels forwarded to the list's icon-only actions. |
|
|
@@ -774,62 +775,92 @@ A folder-tinted glyph, a neutral label and a caret; the folder **name** lives in
|
|
|
774
775
|
never in the label; click opens the folder picker to re-file. Measured from the design
|
|
775
776
|
export's `SavedButton` / `FolderMenu`.
|
|
776
777
|
|
|
777
|
-
Folder CRUD is **opt-in
|
|
778
|
-
|
|
778
|
+
Folder CRUD is **opt-in and explicit**: two props say what the library does, `colors` only
|
|
779
|
+
supplies the palette.
|
|
779
780
|
|
|
780
|
-
- `
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
- `create` — what the footer does: `'none'` (default, no footer), `'event'` (emit `create` with
|
|
782
|
+
the search text; the app runs its own flow) or `'form'` (open the create form **inside the
|
|
783
|
+
panel**, a `DsOrganizerForm`: back arrow, name, swatches, submit).
|
|
784
|
+
- `rowActions` — the ⋮ menu on each row: `'none'` (default), `'event'` (Edit / Delete only emit
|
|
785
|
+
`edit` / `delete`) or `'form'` (Edit also opens the form, pre-filled; its submit stays disabled
|
|
786
|
+
until the name or the colour changes).
|
|
784
787
|
|
|
785
788
|
The component never persists anything and never guesses that a save worked: it emits intent
|
|
786
789
|
(`create-option`, `update-option`, `delete`), and the app saves, then calls the exposed
|
|
787
790
|
`closeForm()` (or sets `formError`). While it saves, `formLoading` blocks the submit.
|
|
788
791
|
|
|
792
|
+
### Rules
|
|
793
|
+
|
|
794
|
+
- **Tooltip:** it shows whenever `tooltip` is not empty, and hides while the panel is open.
|
|
795
|
+
There is no prop for it.
|
|
796
|
+
- **`'form'` needs the palette:** `create="form"` and `rowActions="form"` require a non-empty
|
|
797
|
+
`colors`; Vue warns in dev when it is missing.
|
|
798
|
+
- **`colors` gates nothing:** without `create` or `rowActions` it changes nothing visible.
|
|
799
|
+
- **Footer slot:** it always renders when passed (in every `create` mode) and replaces the
|
|
800
|
+
default button; it receives `openCreateForm(name?)` to open the form from the app's own control.
|
|
801
|
+
- **Copy:** `copy` is partial; the keys it carries override the English defaults
|
|
802
|
+
(`DS_SAVED_BUTTON_COPY`), the rest stays.
|
|
803
|
+
|
|
789
804
|
### Props
|
|
790
805
|
|
|
791
|
-
| Prop
|
|
792
|
-
|
|
|
793
|
-
| `label`
|
|
794
|
-
| `tooltip`
|
|
795
|
-
| `
|
|
796
|
-
| `
|
|
797
|
-
| `
|
|
798
|
-
| `
|
|
799
|
-
| `
|
|
800
|
-
| `
|
|
801
|
-
| `
|
|
802
|
-
| `
|
|
803
|
-
| `
|
|
804
|
-
| `
|
|
805
|
-
| `
|
|
806
|
-
| `
|
|
807
|
-
| `formLoading`
|
|
808
|
-
| `formError`
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
`
|
|
812
|
-
|
|
813
|
-
(`'
|
|
814
|
-
(`'
|
|
815
|
-
|
|
816
|
-
|
|
806
|
+
| Prop | Type | Default | Description |
|
|
807
|
+
| ------------------ | ---------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
808
|
+
| `label` | `string` | — | Neutral label — "Saved", or "Save" before the first save (required). |
|
|
809
|
+
| `tooltip` | `string` | `''` | "Saved in {folder} · change folder". Shows whenever non-empty; hides while the picker is open. |
|
|
810
|
+
| `tooltipPlacement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | Side of the trigger the tooltip opens on (`DsTooltip`'s placements). `left` for a trigger in a right-pinned column. |
|
|
811
|
+
| `folder` | `DsPickerOption \| null` | `null` | The current folder; tints the glyph. `null` = no glyph. |
|
|
812
|
+
| `folders` | `DsPickerOption[]` | — | Every folder the user can pick (required). |
|
|
813
|
+
| `icon` | `string` | `'folder'` | Material Symbols ligature for the folder glyph. |
|
|
814
|
+
| `size` | `'medium' \| 'large'` | `'medium'` | 32px for rows / profile, 36px for action and bulk bars. |
|
|
815
|
+
| `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Add contacts to»). Off = the design's table / profile trigger. |
|
|
816
|
+
| `align` | `'start' \| 'end'` | `'end'` | Which trigger edge the 300px panel hangs from. |
|
|
817
|
+
| `disabled` | `boolean` | `false` | |
|
|
818
|
+
| `teleported` | `boolean` | `false` | Render the picker panel in `<body>` (`DsPopover teleported`). Needed in a sticky / pinned table cell: it is its own stacking context, so inline the cells of the rows below paint over the panel, and a scroll container clips it. |
|
|
819
|
+
| `create` | `'none' \| 'event' \| 'form'` | `'none'` | What the footer does. `DS_PICKER_CREATE_MODES`. |
|
|
820
|
+
| `rowActions` | `'none' \| 'event' \| 'form'` | `'none'` | The ⋮ menu on each row. `DS_PICKER_ROW_ACTIONS`. |
|
|
821
|
+
| `colors` | `string[]` | `[]` | Swatches (hex) of the form. Only the palette; required by the `'form'` modes. |
|
|
822
|
+
| `formLoading` | `boolean` | `false` | The app is saving: the form's submit shows the spinner and is blocked. |
|
|
823
|
+
| `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. |
|
|
824
|
+
| `copy` | `Partial<DsSavedButtonCopy>` | `{}` | Every string, merged over `DS_SAVED_BUTTON_COPY`. See below. |
|
|
825
|
+
|
|
826
|
+
`DsSavedButtonCopy` keys (English defaults): `searchPlaceholder` (`'Search folders'`), `empty`
|
|
827
|
+
(`'No folders found'`, empty string = nothing), `create` (`'New Folder'`, the footer button),
|
|
828
|
+
`actions` (`'Actions'`, the ⋮ `aria-label`), `edit` (`'Edit'`), `delete` (`'Delete'`),
|
|
829
|
+
`createFormTitle` (`'New Folder'`), `editFormTitle` (`'Edit Folder'`), `createSubmit`
|
|
830
|
+
(`'Create & Select'`), `editSubmit` (`'Save'`), `namePlaceholder` (`'Folder name'`), `setColor`
|
|
831
|
+
(`'Set Color'`), `back` (`'Back'`), `errorMissingName` / `errorTooLongName` (the form's own
|
|
832
|
+
defaults when unset).
|
|
817
833
|
|
|
818
834
|
`DsPickerOption` is `{ id, name, color? }` — map frontend-app's `Folder` with
|
|
819
835
|
`{ id: f.uuid, name: f.name, color: f.color }`.
|
|
820
836
|
|
|
837
|
+
#### Deprecated props (removed in 4.0)
|
|
838
|
+
|
|
839
|
+
They still work and are resolved in one place (`resolveLegacyPickerProps`); an explicit new prop
|
|
840
|
+
always wins over its alias. When `create` is not set it is inferred as before: a footer (`createLabel`
|
|
841
|
+
or a `footer` slot) with `colors` = `'form'`, without = `'event'`, no footer = `'none'`.
|
|
842
|
+
|
|
843
|
+
| Deprecated prop | Use instead |
|
|
844
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
845
|
+
| `rowActions` (boolean) | `rowActions="form"` (with `colors`) / `"event"`; `false` = `"none"` |
|
|
846
|
+
| `createLabel` | `create="event"` or `"form"` + `copy.create` |
|
|
847
|
+
| `searchPlaceholder`, `emptyLabel` | `copy.searchPlaceholder`, `copy.empty` |
|
|
848
|
+
| `actionsLabel`, `editLabel`, `deleteLabel` | `copy.actions`, `copy.edit`, `copy.delete` |
|
|
849
|
+
| `createFormTitle`, `editFormTitle`, `createSubmitLabel`, `editSubmitLabel`, `formNamePlaceholder`, `setColorLabel`, `backLabel`, `errorMissingName`, `errorTooLongName` | `copy.createFormTitle`, `copy.editFormTitle`, `copy.createSubmit`, `copy.editSubmit`, `copy.namePlaceholder`, `copy.setColor`, `copy.back`, `copy.errorMissingName`, `copy.errorTooLongName` |
|
|
850
|
+
|
|
821
851
|
### Events
|
|
822
852
|
|
|
823
|
-
| Event | Payload | When
|
|
824
|
-
| --------------- | --------------------- |
|
|
825
|
-
| `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here.
|
|
826
|
-
| `create` | `string` |
|
|
827
|
-
| `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `
|
|
828
|
-
| `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change.
|
|
829
|
-
| `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`.
|
|
830
|
-
| `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`.
|
|
831
|
-
| `
|
|
832
|
-
| `
|
|
853
|
+
| Event | Payload | When |
|
|
854
|
+
| --------------- | --------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
855
|
+
| `pick` | `DsPickerOption` | A folder was chosen. The panel closes. PATCH `folder_ids` here. |
|
|
856
|
+
| `create` | `string` | The footer was clicked with `create="event"`; payload is the search text typed so far. The panel closes. |
|
|
857
|
+
| `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
|
|
858
|
+
| `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
|
|
859
|
+
| `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
|
|
860
|
+
| `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
|
|
861
|
+
| `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
|
|
862
|
+
| `search` | `string` | The search text changed (filtering is local). |
|
|
863
|
+
| `update:open` | `boolean` | The panel opened or closed. |
|
|
833
864
|
|
|
834
865
|
### Exposed
|
|
835
866
|
|
|
@@ -839,9 +870,9 @@ the form flow has no entry point.
|
|
|
839
870
|
|
|
840
871
|
### Slots
|
|
841
872
|
|
|
842
|
-
| Slot | Scope
|
|
843
|
-
| -------- |
|
|
844
|
-
| `footer` | `{ query: string }` | Replace the create button with the app's own control. |
|
|
873
|
+
| Slot | Scope | Use |
|
|
874
|
+
| -------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
875
|
+
| `footer` | `{ query: string, openCreateForm(name?: string): void }` | Replace the create button with the app's own control. `openCreateForm` opens the form (name defaults to the search text); needs `colors`. |
|
|
845
876
|
|
|
846
877
|
### Accessibility
|
|
847
878
|
|
|
@@ -858,6 +889,9 @@ the form flow has no entry point.
|
|
|
858
889
|
is open at a time. It is teleported to `<body>`, so the scrollable list never clips it, and
|
|
859
890
|
pressing inside it does not close the picker (nested `DsPopover`s register with their parent).
|
|
860
891
|
- Back from the form (or `closeForm()`) returns focus to the search field.
|
|
892
|
+
- `teleported` keeps all of the above: Esc and outside press are handled by `DsPopover` on the
|
|
893
|
+
body panel, the search still takes focus on open, and the panel closes when the trigger
|
|
894
|
+
scrolls out of view of its scroll container.
|
|
861
895
|
|
|
862
896
|
### Design parity (export `SavedButton` / `FolderMenu`)
|
|
863
897
|
|
|
@@ -895,15 +929,17 @@ Named `DsTagPicker`, not `DsTag`: `DsTag` is already the DS outlined chip.
|
|
|
895
929
|
**Selection is a working copy.** Toggling checkboxes changes nothing outside the panel;
|
|
896
930
|
`apply` fires once, with the final list. Closing without Apply discards.
|
|
897
931
|
|
|
898
|
-
Tag CRUD is **opt-in
|
|
899
|
-
|
|
932
|
+
Tag CRUD is **opt-in and explicit**: two props say what the library does, `colors` only
|
|
933
|
+
supplies the palette.
|
|
900
934
|
|
|
901
|
-
- `
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
935
|
+
- `create` — what the create affordance does: `'none'` (default), `'event'` (the inline
|
|
936
|
+
«Create “q”» row emits `create` with the search text; the app runs its own flow) or `'form'`
|
|
937
|
+
(the row **and** a footer «+ New Tag» button open the create form **inside the panel**, a
|
|
938
|
+
`DsOrganizerForm`: back arrow, name, swatches, submit; the name arrives pre-filled with the
|
|
939
|
+
search text).
|
|
940
|
+
- `rowActions` — the ⋮ menu on each row: `'none'` (default), `'event'` (Edit / Delete only emit
|
|
941
|
+
`edit` / `delete`) or `'form'` (Edit also opens the form, pre-filled; its submit stays disabled
|
|
942
|
+
until the name or the colour changes).
|
|
907
943
|
|
|
908
944
|
The component never persists anything and never guesses that a save worked: it emits intent
|
|
909
945
|
(`create-option`, `update-option`, `delete`), and the app saves, then calls the exposed
|
|
@@ -911,47 +947,74 @@ The component never persists anything and never guesses that a save worked: it e
|
|
|
911
947
|
form and back keeps the search and the working-copy selection; the picker never selects the tag it
|
|
912
948
|
created — the app decides.
|
|
913
949
|
|
|
950
|
+
### Rules
|
|
951
|
+
|
|
952
|
+
- **`'form'` needs the palette:** `create="form"` and `rowActions="form"` require a non-empty
|
|
953
|
+
`colors`; Vue warns in dev when it is missing.
|
|
954
|
+
- **`colors` gates nothing:** without `create` or `rowActions` it changes nothing visible.
|
|
955
|
+
- **Two create texts:** `copy.createRow` is the inline «Create “q”» row and `copy.newButton` is the
|
|
956
|
+
footer «+ New Tag» (only with `create="form"`). The deprecated `createLabel` fed both.
|
|
957
|
+
- **Tooltip:** automatic. The trigger shows the full label only while it is truncated, and hides
|
|
958
|
+
while the panel is open.
|
|
959
|
+
- **Copy:** `copy` is partial; the keys it carries override the English defaults
|
|
960
|
+
(`DS_TAG_PICKER_COPY`), the rest stays.
|
|
961
|
+
|
|
914
962
|
### Props
|
|
915
963
|
|
|
916
|
-
| Prop
|
|
917
|
-
|
|
|
918
|
-
| `label`
|
|
919
|
-
| `
|
|
920
|
-
| `
|
|
921
|
-
| `
|
|
922
|
-
| `
|
|
923
|
-
| `
|
|
924
|
-
| `
|
|
925
|
-
| `
|
|
926
|
-
| `
|
|
927
|
-
| `
|
|
928
|
-
| `
|
|
929
|
-
| `
|
|
930
|
-
| `
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
`
|
|
938
|
-
|
|
939
|
-
`formNamePlaceholder` (`'Tag name'`), `setColorLabel` (`'Set Color'`), `backLabel` (`'Back'`),
|
|
940
|
-
`errorMissingName` / `errorTooLongName` (the form's own defaults).
|
|
964
|
+
| Prop | Type | Default | Description |
|
|
965
|
+
| ------------- | ----------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
966
|
+
| `label` | `string` | — | Trigger label while untagged ("Tag") (required). |
|
|
967
|
+
| `tags` | `DsPickerOption[]` | `[]` | The tags applied to the contact. |
|
|
968
|
+
| `options` | `DsPickerOption[]` | — | Every tag the user can pick (required). |
|
|
969
|
+
| `size` | `'medium' \| 'large'` | `'medium'` | |
|
|
970
|
+
| `pill` | `boolean` | `false` | Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton` («Tag»). Off = the design's row / profile trigger. |
|
|
971
|
+
| `align` | `'start' \| 'end'` | `'start'` | Which trigger edge the 240px panel hangs from. |
|
|
972
|
+
| `disabled` | `boolean` | `false` | |
|
|
973
|
+
| `create` | `'none' \| 'event' \| 'form'` | `'none'` | What the create affordance does. `DS_PICKER_CREATE_MODES`. |
|
|
974
|
+
| `rowActions` | `'none' \| 'event' \| 'form'` | `'none'` | The ⋮ menu on each row. `DS_PICKER_ROW_ACTIONS`. |
|
|
975
|
+
| `colors` | `string[]` | `[]` | Swatches (hex) of the form. Only the palette; required by the `'form'` modes. |
|
|
976
|
+
| `formLoading` | `boolean` | `false` | The app is saving: the form's submit shows the spinner and is blocked. |
|
|
977
|
+
| `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. |
|
|
978
|
+
| `copy` | `Partial<DsTagPickerCopy>` | `{}` | Every string, merged over `DS_TAG_PICKER_COPY`. See below. |
|
|
979
|
+
|
|
980
|
+
`DsTagPickerCopy` keys (English defaults): `taggedAs` (`'Tagged as'`), `apply` (`'Apply'`),
|
|
981
|
+
`searchPlaceholder` (`'Search tags'`), `empty` (`'No tags found'`, empty string = nothing), `more`
|
|
982
|
+
(`''`, the `+N` chip's accessible name), `createRow` (`'Create'`), `newButton` (`'New Tag'`),
|
|
983
|
+
`actions` (`'Actions'`, the ⋮ `aria-label`), `edit` (`'Edit'`), `delete` (`'Delete'`),
|
|
984
|
+
`createFormTitle` (`'New Tag'`), `editFormTitle` (`'Edit Tag'`), `createSubmit` (`'Create'`),
|
|
985
|
+
`editSubmit` (`'Save'`), `namePlaceholder` (`'Tag name'`), `setColor` (`'Set Color'`), `back`
|
|
986
|
+
(`'Back'`), `errorMissingName` / `errorTooLongName` (the form's own defaults when unset).
|
|
941
987
|
|
|
942
988
|
Map frontend-app's `Tag` with `{ id: t.id, name: t.name, color: t.color }` — the API takes
|
|
943
989
|
tags by numeric `id` (`projects_ids`), unlike folders.
|
|
944
990
|
|
|
991
|
+
#### Deprecated props (removed in 4.0)
|
|
992
|
+
|
|
993
|
+
They still work and are resolved in one place (`resolveLegacyPickerProps`); an explicit new prop
|
|
994
|
+
always wins over its alias. When `create` is not set it is inferred as before: `createLabel` with
|
|
995
|
+
`colors` = `'form'`, without = `'event'`, no `createLabel` = `'none'`. `taggedAsLabel` and
|
|
996
|
+
`applyLabel` are no longer required.
|
|
997
|
+
|
|
998
|
+
| Deprecated prop | Use instead |
|
|
999
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1000
|
+
| `rowActions` (boolean) | `rowActions="form"` (with `colors`) / `"event"`; `false` = `"none"` |
|
|
1001
|
+
| `createLabel` | `create="event"` or `"form"` + `copy.createRow` (inline row) and `copy.newButton` (footer) |
|
|
1002
|
+
| `taggedAsLabel`, `applyLabel`, `moreLabel` | `copy.taggedAs`, `copy.apply`, `copy.more` |
|
|
1003
|
+
| `searchPlaceholder`, `emptyLabel` | `copy.searchPlaceholder`, `copy.empty` |
|
|
1004
|
+
| `actionsLabel`, `editLabel`, `deleteLabel` | `copy.actions`, `copy.edit`, `copy.delete` |
|
|
1005
|
+
| `createFormTitle`, `editFormTitle`, `createSubmitLabel`, `editSubmitLabel`, `formNamePlaceholder`, `setColorLabel`, `backLabel`, `errorMissingName`, `errorTooLongName` | `copy.createFormTitle`, `copy.editFormTitle`, `copy.createSubmit`, `copy.editSubmit`, `copy.namePlaceholder`, `copy.setColor`, `copy.back`, `copy.errorMissingName`, `copy.errorTooLongName` |
|
|
1006
|
+
|
|
945
1007
|
### Events
|
|
946
1008
|
|
|
947
1009
|
| Event | Payload | When |
|
|
948
1010
|
| --------------- | --------------------- | ------------------------------------------------------------------------------------------ |
|
|
949
1011
|
| `apply` | `DsPickerOption[]` | Apply clicked: the full new selection, in `options` order. Panel closes. |
|
|
950
|
-
| `create` | `string` | The create row was clicked
|
|
951
|
-
| `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `
|
|
1012
|
+
| `create` | `string` | The create row was clicked with `create="event"`; payload is the typed text. |
|
|
1013
|
+
| `edit` | `DsPickerOption` | Edit chosen in a row's ⋮ menu (with `rowActions="form"` the form opens too). |
|
|
952
1014
|
| `delete` | `DsPickerOption` | Delete chosen in a row's ⋮ menu. Confirm and delete in the app; the panel does not change. |
|
|
953
1015
|
| `create-option` | `{ name, color }` | The create form was submitted (name trimmed). The form stays open until `closeForm()`. |
|
|
954
1016
|
| `update-option` | `{ id, name, color }` | The edit form was submitted. Same: stays open until `closeForm()`. |
|
|
1017
|
+
| `form-close` | — | The form was dismissed (back, `closeForm()` or the panel closing). Clear `formError` here. |
|
|
955
1018
|
| `search` | `string` | The search text changed (filtering is local). |
|
|
956
1019
|
| `update:open` | `boolean` | The panel opened or closed. |
|
|
957
1020
|
|
|
@@ -995,7 +1058,7 @@ aria-expanded>`), so it never toggles the tag. It appears on row hover, on keybo
|
|
|
995
1058
|
hover — the DS has no `#FFF7F7`, so the hover is `error-tint` (a touch stronger); the shadow
|
|
996
1059
|
is the DS `shadow-dropdown`, not the export's `0 8px 28px`. Each item also carries its glyph
|
|
997
1060
|
(`edit` / `delete`), as in production.
|
|
998
|
-
- Footer with `
|
|
1061
|
+
- Footer with `create="form"`: «+ New …» is a `DsButton` tertiary (text) with the `add` glyph on the left,
|
|
999
1062
|
Apply on the right; the panel stays 240px in the form view, which drops its padding to bring
|
|
1000
1063
|
its own rows.
|
|
1001
1064
|
|
|
@@ -1968,24 +2031,24 @@ on `close`.
|
|
|
1968
2031
|
## DsNotification
|
|
1969
2032
|
|
|
1970
2033
|
Fixed-position toast card for transient feedback (saved, updated, failed…). It renders
|
|
1971
|
-
itself into one of the four viewport corners, optionally auto-dismisses, and can carry a
|
|
2034
|
+
itself into one of the four viewport corners or the top center, optionally auto-dismisses, and can carry a
|
|
1972
2035
|
single action link. **Presentational only**: it owns its own visibility timer, but all
|
|
1973
2036
|
routing/consequences stay with the consuming app via events.
|
|
1974
2037
|
|
|
1975
2038
|
### Props
|
|
1976
2039
|
|
|
1977
|
-
| Prop | Type
|
|
1978
|
-
| ------------- |
|
|
1979
|
-
| `type` | `'success' \| 'info' \| 'warning' \| 'error'`
|
|
1980
|
-
| `position` | `'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right'` | `'bottom-left'` | Viewport corner the toast fixes to.
|
|
1981
|
-
| `title` | `string`
|
|
1982
|
-
| `description` | `string`
|
|
1983
|
-
| `link` | `string`
|
|
1984
|
-
| `linkTitle` | `string`
|
|
1985
|
-
| `linkTarget` | `'_blank' \| '_self' \| '_parent' \| '_top'`
|
|
1986
|
-
| `showClose` | `boolean`
|
|
1987
|
-
| `closeLabel` | `string`
|
|
1988
|
-
| `duration` | `number`
|
|
2040
|
+
| Prop | Type | Default | Description |
|
|
2041
|
+
| ------------- | ------------------------------------------------------------------------------ | --------------- | ----------------------------------------------------------------------------- |
|
|
2042
|
+
| `type` | `'success' \| 'info' \| 'warning' \| 'error'` | `'info'` | Semantic style + icon. |
|
|
2043
|
+
| `position` | `'top-left' \| 'top-center' \| 'top-right' \| 'bottom-left' \| 'bottom-right'` | `'bottom-left'` | Viewport corner (or top center) the toast fixes to. |
|
|
2044
|
+
| `title` | `string` | — | Bold heading line. |
|
|
2045
|
+
| `description` | `string` | — | Body copy under the title. |
|
|
2046
|
+
| `link` | `string` | — | `href` for the optional action link. |
|
|
2047
|
+
| `linkTitle` | `string` | — | Visible text for the link (required for the link to render). |
|
|
2048
|
+
| `linkTarget` | `'_blank' \| '_self' \| '_parent' \| '_top'` | `'_blank'` | `<a target>`. `_blank` adds `rel="noopener noreferrer"`. |
|
|
2049
|
+
| `showClose` | `boolean` | `true` | Show the × dismiss button. |
|
|
2050
|
+
| `closeLabel` | `string` | `'Close'` | `aria-label` for the × button (icon-only control). |
|
|
2051
|
+
| `duration` | `number` | `0` | Auto-dismiss delay in ms. `0` = stays until dismissed. Timer pauses on hover. |
|
|
1989
2052
|
|
|
1990
2053
|
### Events
|
|
1991
2054
|
|
|
@@ -1997,6 +2060,15 @@ routing/consequences stay with the consuming app via events.
|
|
|
1997
2060
|
> The link is a real `<a href>` (a11y + no-JS fallback). Default behaviour opens it natively;
|
|
1998
2061
|
> listen to `navigate` and call `event.preventDefault()` to intercept and route inside the SPA.
|
|
1999
2062
|
|
|
2063
|
+
### Top center
|
|
2064
|
+
|
|
2065
|
+
`position="top-center"` is the confirmation toast of an action in the page (a reveal, a save):
|
|
2066
|
+
pass `type="success"`, the app's copy in `title` (e.g. «Contact details revealed · N credits
|
|
2067
|
+
used») and `:duration="3400"`. Toasts at this position share one fixed host and stack in a
|
|
2068
|
+
column, newest below, 8px apart, so several alive at once never overlap. They fade in
|
|
2069
|
+
sliding down (off under `prefers-reduced-motion`) and leave instantly, like the corners, which keep
|
|
2070
|
+
their behaviour (one toast per corner, teleported straight to `<body>`).
|
|
2071
|
+
|
|
2000
2072
|
### Accessibility
|
|
2001
2073
|
|
|
2002
2074
|
- The × button is icon-only, so `closeLabel` maps to its `aria-label` — always pass it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesql/sql_components_vue3",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Librería de componentes Vue 3 (SalesQL)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@histoire/plugin-vue": "1.0.0-beta.1",
|
|
33
|
+
"@histoire/shared": "1.0.0-beta.1",
|
|
33
34
|
"@vitejs/plugin-vue": "6.0.1",
|
|
34
35
|
"@vitest/coverage-v8": "^3.2.0",
|
|
35
36
|
"@vue/test-utils": "^2.4.6",
|