@cobre-npm/ds-v3 0.128.3 → 0.130.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.
@@ -32,6 +32,7 @@ export { default as CobreAccountInfoField } from './molecules/CobreAccountInfoFi
32
32
  export { default as CobreActionList } from './molecules/CobreActionList/CobreActionList.vue';
33
33
  export { default as CobreBadge } from './molecules/CobreBadge/CobreBadge.vue';
34
34
  export { default as CobreChips } from './molecules/CobreChips/CobreChips.vue';
35
+ export { default as CobreCollapsableCard } from './molecules/CobreCollapsableCard/CobreCollapsableCard.vue';
35
36
  export { default as CobreCopyTextBox } from './molecules/CobreCopyTextBox/CobreCopyTextBox.vue';
36
37
  export { default as CobreDrawer } from './molecules/CobreDrawer/CobreDrawer.vue';
37
38
  export { default as CobreDropdownButton } from './molecules/CobreDropdownButton/CobreDropdownButton.vue';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * CobreCollapsableCard — a collapsable card container with an interactive header and animated body.
3
+ * Consolidates the collapsable card pattern used across multiple MFEs (NewSubclient, Developer, etc).
4
+ * Use for forms, data sections, or any content that should collapse on demand. The header is clickable
5
+ * to toggle expansion; use the primaryAction slot for action buttons (remove, edit) without triggering collapse.
6
+ */
7
+ interface Props {
8
+ title: string;
9
+ subtitle?: string;
10
+ }
11
+ type __VLS_Props = Props;
12
+ type __VLS_PublicProps = __VLS_Props & {
13
+ 'isExpanded'?: boolean;
14
+ };
15
+ declare var __VLS_1: {}, __VLS_14: {};
16
+ type __VLS_Slots = {} & {
17
+ primaryAction?: (props: typeof __VLS_1) => any;
18
+ } & {
19
+ 'card-content'?: (props: typeof __VLS_14) => any;
20
+ };
21
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:isExpanded": (value: boolean) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:isExpanded"?: ((value: boolean) => any) | undefined;
25
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,12 @@
1
+ import type { Directive } from 'vue';
2
+ interface DropdownElement extends HTMLElement {
3
+ _coDropdownCleanup?: () => void;
4
+ }
5
+ /**
6
+ * `v-co-dropdown` — activates the Bootstrap dropdown that DS components declare.
7
+ *
8
+ * On click it first hides any other open dropdown, then opens its own, so at most
9
+ * one is visible at a time. Registered for consumers by `CobreDirectives`.
10
+ */
11
+ export declare const coDropdown: Directive<DropdownElement>;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Directive } from 'vue';
2
+ /**
3
+ * `v-co-error-bank-logo` — no-op placeholder. `CobreBankLogo` applies this
4
+ * directive, so it must resolve or Vue logs `Failed to resolve directive`. It
5
+ * carries no behavior today (mirrors the empty directive in the portal app);
6
+ * kept as a named export so it can grow behavior without touching consumers.
7
+ */
8
+ export declare const coErrorBankLogo: Directive;
@@ -0,0 +1,29 @@
1
+ import type { Directive } from 'vue';
2
+ interface TooltipElement extends HTMLElement {
3
+ _coTooltipCleanup?: () => void;
4
+ }
5
+ /**
6
+ * Hide every currently-mounted DS tooltip. Router-agnostic trigger: the DS exposes
7
+ * it and the app decides when to fire it, so the DS never depends on `vue-router`.
8
+ *
9
+ * Most navigation unmounts the tooltipped element, and `unmounted` already disposes
10
+ * it — so this is only needed for tooltips on elements that survive navigation (a
11
+ * persistent shell/header). Wire it once, wherever "dismiss now" makes sense (a
12
+ * route guard, a modal open, a tab switch):
13
+ *
14
+ * ```ts
15
+ * import { hideOpenTooltips } from '@cobre-npm/ds-v3'
16
+ * router.beforeEach(() => { hideOpenTooltips() })
17
+ * ```
18
+ */
19
+ export declare const hideOpenTooltips: () => void;
20
+ /**
21
+ * `v-co-tooltip` — activates the Bootstrap tooltip that DS components declare via
22
+ * `data-bs-toggle="tooltip"` + `title` / `data-bs-original-title`.
23
+ *
24
+ * Registered for consumers by the `CobreDirectives` plugin (see `./index`), so an
25
+ * app only needs `app.use(CobreDirectives)`. For hiding on navigation see
26
+ * {@link hideOpenTooltips}.
27
+ */
28
+ export declare const coTooltip: Directive<TooltipElement>;
29
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { App } from 'vue';
2
+ import { coTooltip, hideOpenTooltips } from './co-tooltip';
3
+ import { coDropdown } from './co-dropdown';
4
+ import { coErrorBankLogo } from './co-error-bank-logo';
5
+ export { coTooltip, coDropdown, coErrorBankLogo, hideOpenTooltips };
6
+ /**
7
+ * Vue plugin that registers the DS's custom directives. Many DS components render
8
+ * `v-co-tooltip` / `v-co-dropdown` in their templates, so consumers must install
9
+ * this once or Vue logs `Failed to resolve directive: ...` and the behavior never
10
+ * activates:
11
+ *
12
+ * ```ts
13
+ * import { CobreDirectives } from '@cobre-npm/ds-v3'
14
+ * app.use(CobreDirectives)
15
+ * ```
16
+ */
17
+ export declare const CobreDirectives: {
18
+ install(app: App): void;
19
+ };
@@ -1,4 +1,5 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './scss/index.scss';
3
4
  export * as CobreUtils from './utils';
4
5
  export { Tooltip, Dropdown } from 'bootstrap';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/ds-v3",
3
- "version": "0.128.3",
3
+ "version": "0.130.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.0.4",
6
6
  "engines": {