@cobre-npm/ds-v3 0.129.0 → 0.131.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/cobre-ds-v3-lib.es.js +3248 -3179
- package/dist/style.css +1 -1
- package/dist/types/components/molecules/CobreCollapsableCard/CobreCollapsableCard.vue.d.ts +4 -0
- package/dist/types/directives/co-dropdown.d.ts +12 -0
- package/dist/types/directives/co-error-bank-logo.d.ts +8 -0
- package/dist/types/directives/co-tooltip.d.ts +29 -0
- package/dist/types/directives/index.d.ts +19 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* Consolidates the collapsable card pattern used across multiple MFEs (NewSubclient, Developer, etc).
|
|
4
4
|
* Use for forms, data sections, or any content that should collapse on demand. The header is clickable
|
|
5
5
|
* to toggle expansion; use the primaryAction slot for action buttons (remove, edit) without triggering collapse.
|
|
6
|
+
*
|
|
7
|
+
* Theming — override these CSS custom properties from the consumer to restyle without :deep():
|
|
8
|
+
* --cobre-collapsable-card-bg card background (default: --cobre-primary-5)
|
|
9
|
+
* --cobre-collapsable-card-header-bg header background (default: transparent, inherits the card bg)
|
|
6
10
|
*/
|
|
7
11
|
interface Props {
|
|
8
12
|
title: string;
|
|
@@ -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
|
+
};
|
package/dist/types/index.d.ts
CHANGED