@cobre-npm/ds-v3 0.131.0 → 0.133.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.
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ currentStep: number;
3
+ totalSteps: number;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ prev: () => any;
7
+ next: () => any;
8
+ goToStep: (step: number) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onPrev?: (() => any) | undefined;
11
+ onNext?: (() => any) | undefined;
12
+ onGoToStep?: ((step: number) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from './CobreCarouselControls.vue';
@@ -22,10 +22,12 @@ export { default as CobreUploader } from './atoms/CobreUploader/CobreUploader.vu
22
22
  export { default as CobreAlert } from './atoms/CobreAlert/CobreAlert.vue';
23
23
  export { default as CobreSwitch } from './atoms/CobreSwitch/CobreSwitch.vue';
24
24
  export { default as CobreCardButton } from './atoms/CobreCardButton/CobreCardButton.vue';
25
+ export { default as CobreCarouselControls } from './atoms/CobreCarouselControls/CobreCarouselControls.vue';
25
26
  export { default as CobreRowActions } from './atoms/CobreRowActions/CobreRowActions.vue';
26
27
  export { default as CobreSegmentedTabs } from './atoms/CobreSegmentedTabs/CobreSegmentedTabs.vue';
27
28
  export { default as CobreHeadline } from './atoms/CobreHeadline/CobreHeadline.vue';
28
29
  export { default as CobreDetailRow } from './atoms/CobreDetailRow/CobreDetailRow.vue';
30
+ export { default as CobreSuggestionCard } from './molecules/CobreSuggestionCard/CobreSuggestionCard.vue';
29
31
  export { default as CobreAccountCpButton } from './molecules/CobreAccountCpButton/CobreAccountCpButton.vue';
30
32
  export { default as CobreAccountCpLogo } from './molecules/CobreAccountCpLogo/CobreAccountCpLogo.vue';
31
33
  export { default as CobreAccountInfoField } from './molecules/CobreAccountInfoFiled/CobreAccountInfoField.vue';
@@ -76,3 +78,5 @@ export type * from './organisms/CobreFilterPanel/interfaces/filter.interface';
76
78
  export { default as CobreAccountPicker } from './organisms/CobreAccountPicker/CobreAccountPicker.vue';
77
79
  export { default as CobreAccountPickerModal } from './organisms/CobreAccountPickerModal/CobreAccountPickerModal.vue';
78
80
  export type * from './organisms/CobreAccountPickerModal/interfaces/account-selector-modal.interface';
81
+ export { default as CobreWidgetSuggestions } from './organisms/CobreWidgetSuggestions/CobreWidgetSuggestions.vue';
82
+ export type * from './organisms/CobreWidgetSuggestions/interfaces/suggestion.interface';
@@ -0,0 +1,47 @@
1
+ interface Props {
2
+ /** Main heading of the card (e.g. the widget name). */
3
+ title: string;
4
+ /** Supporting copy shown below the title. */
5
+ description: string;
6
+ /** Small tag/eyebrow shown above the title (e.g. "Improve your panel"). */
7
+ tagLabel: string;
8
+ /** URL of the illustration rendered in the header. */
9
+ imageUrl: string;
10
+ /** Alt text for the illustration. Falls back to `title` when omitted. */
11
+ imageAlt?: string;
12
+ /** Whether to show the prev/next carousel arrows inside the body. */
13
+ showNav?: boolean;
14
+ /** aria-label for the previous (left) arrow. */
15
+ prevLabel?: string;
16
+ /** aria-label for the next (right) arrow. */
17
+ nextLabel?: string;
18
+ /** Identity of the current slide — changing it drives the enter/leave transition. */
19
+ slideKey?: string;
20
+ /** Direction of the last navigation — picks the translateX direction of the slide. */
21
+ slideDirection?: 'next' | 'prev';
22
+ }
23
+ declare var __VLS_9: {};
24
+ type __VLS_Slots = {} & {
25
+ action?: (props: typeof __VLS_9) => any;
26
+ };
27
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ prev: () => any;
29
+ next: () => any;
30
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
+ onPrev?: (() => any) | undefined;
32
+ onNext?: (() => any) | undefined;
33
+ }>, {
34
+ imageAlt: string;
35
+ showNav: boolean;
36
+ prevLabel: string;
37
+ nextLabel: string;
38
+ slideKey: string;
39
+ slideDirection: "next" | "prev";
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,23 @@
1
+ import type { WidgetSuggestionItem } from './interfaces/suggestion.interface';
2
+ interface Props {
3
+ /** Suggestions shown one at a time in a looping carousel. Empty hides the widget. */
4
+ suggestions: WidgetSuggestionItem[];
5
+ /** FAB label and aria-label (e.g. "Suggestions"). */
6
+ fabLabel: string;
7
+ /** Call-to-action label inside the card (e.g. "View widget"). */
8
+ ctaLabel: string;
9
+ /** Tag/eyebrow label shown on the card. */
10
+ tagLabel: string;
11
+ /** aria-label for the popover close button. */
12
+ closeLabel: string;
13
+ /** aria-label for the previous (left) carousel arrow. */
14
+ prevLabel: string;
15
+ /** aria-label for the next (right) carousel arrow. */
16
+ nextLabel: string;
17
+ }
18
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ activate: (id: string) => any;
20
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
21
+ onActivate?: ((id: string) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { WidgetSuggestionItem } from './interfaces/suggestion.interface';
2
+ interface Props {
3
+ /** Suggestions shown one at a time in a looping carousel. */
4
+ suggestions: WidgetSuggestionItem[];
5
+ /** FAB label and aria-label (e.g. "Suggestions"). */
6
+ fabLabel: string;
7
+ /** Call-to-action label inside the card (e.g. "View widget"). */
8
+ ctaLabel: string;
9
+ /** Tag/eyebrow label shown on the card. */
10
+ tagLabel: string;
11
+ /** aria-label for the popover close button. */
12
+ closeLabel: string;
13
+ /** aria-label for the previous (left) carousel arrow. */
14
+ prevLabel: string;
15
+ /** aria-label for the next (right) carousel arrow. */
16
+ nextLabel: string;
17
+ }
18
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ activate: (id: string) => any;
20
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
21
+ onActivate?: ((id: string) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ export default _default;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A single widget suggestion rendered by CobreWidgetSuggestions / CobreSuggestionCard.
3
+ * Presentational shape only — DS-ready, with no portal types.
4
+ */
5
+ export interface WidgetSuggestionItem {
6
+ /** Stable unique id; emitted by `activate` when the user picks this suggestion. */
7
+ id: string;
8
+ /** Widget name shown as the card title. */
9
+ title: string;
10
+ /** Short description of what the widget does. */
11
+ description: string;
12
+ /** URL of the widget illustration shown in the card header. */
13
+ imageUrl: string;
14
+ }
@@ -0,0 +1,22 @@
1
+ import { type Ref } from 'vue';
2
+ /**
3
+ * Generic looping carousel over a reactive list. Presentational/UI only — no
4
+ * portal dependencies, so it travels to the DS together with the suggestion
5
+ * card/FAB.
6
+ *
7
+ * The index is intentionally decoupled from the list: consumers that need it
8
+ * reset on a list change should remount the component (e.g. via a `:key`) rather
9
+ * than reset it here.
10
+ *
11
+ * @param items Reactive list to iterate over.
12
+ * @returns
13
+ * - `current`: the item at the current index (null when the list is empty).
14
+ * - `hasMultiple`: whether there is more than one item (i.e. navigation applies).
15
+ * - `next` / `prev`: advance the carousel, wrapping around at the ends.
16
+ */
17
+ export declare const useCarousel: <T>(items: Ref<T[]>) => {
18
+ current: import("vue").ComputedRef<T | null>;
19
+ hasMultiple: import("vue").ComputedRef<boolean>;
20
+ next: () => void;
21
+ prev: () => void;
22
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/ds-v3",
3
- "version": "0.131.0",
3
+ "version": "0.133.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.0.4",
6
6
  "engines": {
@@ -43,8 +43,10 @@
43
43
  "devDependencies": {
44
44
  "@chromatic-com/storybook": "^5.0.0",
45
45
  "@storybook/addon-a11y": "10.1.11",
46
+ "@storybook/addon-docs": "10.1.11",
46
47
  "@storybook/addon-links": "10.1.11",
47
48
  "@storybook/test-runner": "^0.24.2",
49
+ "@storybook/vue3": "10.1.11",
48
50
  "@storybook/vue3-vite": "10.1.11",
49
51
  "@types/bootstrap": "^5.2.10",
50
52
  "@types/vue-select": "^3.16.8",
@@ -62,8 +64,7 @@
62
64
  "typescript": "^5.2.2",
63
65
  "vite": "^5.2.0",
64
66
  "vite-plugin-static-copy": "^1.0.5",
65
- "vue-tsc": "^2.0.6",
66
- "@storybook/addon-docs": "10.1.11"
67
+ "vue-tsc": "^2.0.6"
67
68
  },
68
69
  "peerDependencies": {
69
70
  "@vuepic/vue-datepicker": "^9.0.3",