@cobre-npm/ds-v3 0.126.0 → 0.126.2
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/README.md +50 -31
- package/dist/cobre-ds-v3-lib.es.js +22 -12
- package/dist/style.css +1 -1
- package/dist/types/components/atoms/CobreAlert/CobreAlert.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreButton/CobreButton.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreCheckbox/CobreCheckbox.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreEmptyState/CobreEmptyState.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreToastAlert/CobreToastAlert.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreBadge/CobreBadge.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreChips/CobreChips.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreDrawer/CobreDrawer.vue.d.ts +8 -0
- package/dist/types/components/molecules/CobreDropdownButton/CobreDropdownButton.vue.d.ts +7 -0
- package/dist/types/components/molecules/CobreInput/CobreInput.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreModal/CobreModal.vue.d.ts +7 -0
- package/dist/types/components/molecules/CobreSelect/CobreSelect.vue.d.ts +8 -0
- package/dist/types/components/molecules/CobreSnackBar/CobreSnackBar.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreTextArea/CobreTextArea.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreAccountPickerModal/CobreAccountPickerModal.vue.d.ts +7 -0
- package/package.json +5 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
type IconType = "danger" | "success" | "warning" | "info" | null;
|
|
2
|
+
/**
|
|
3
|
+
* CobreAlert — inline alert banner that surfaces a contextual status message.
|
|
4
|
+
* Use to highlight success, error, warning, or info states within page content.
|
|
5
|
+
* Optionally shows a close button (emits `close`) and a `contentComponent` slot
|
|
6
|
+
* for extra content below the message.
|
|
7
|
+
*/
|
|
2
8
|
interface Props {
|
|
3
9
|
type?: IconType;
|
|
4
10
|
content?: string;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ButtonThemes, ButtonColors } from '../../../types/button.types';
|
|
2
2
|
type Sizes = 'big' | 'medium' | 'small' | 'auto';
|
|
3
|
+
/**
|
|
4
|
+
* CobreButton — the primary action button for the Cobre platform.
|
|
5
|
+
* Use for form submits, primary/secondary actions, toolbar actions, and icon-only
|
|
6
|
+
* buttons. For navigation that looks like inline text, use the `link` theme.
|
|
7
|
+
* Provides `start`, `end`, and `content` slots for icons or custom content.
|
|
8
|
+
*/
|
|
3
9
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
10
|
theme: {
|
|
5
11
|
type: () => ButtonThemes;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreCheckbox — a single checkbox with optional label, helper description and tooltip.
|
|
3
|
+
* Use for boolean toggles in forms; binds via v-model and also emits 'changed'.
|
|
4
|
+
* Provides an `option` slot rendered after the label (e.g. an extra icon or control).
|
|
5
|
+
*/
|
|
1
6
|
interface Props {
|
|
2
7
|
modelValue: any;
|
|
3
8
|
disabled?: boolean;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreEmptyState — a placeholder panel for empty or zero-data screens.
|
|
3
|
+
* Use to fill a section that has no content yet, pairing a descriptive message
|
|
4
|
+
* with an illustration on a subtle tinted background. Provides a `content` slot
|
|
5
|
+
* for the heading/text shown beside the image.
|
|
6
|
+
*/
|
|
1
7
|
type __VLS_Props = {
|
|
2
8
|
image: string;
|
|
3
9
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
type IconType = 'danger' | 'success' | 'warning' | 'info' | null;
|
|
2
|
+
/**
|
|
3
|
+
* CobreToastAlert — a self-contained toast-style status notification.
|
|
4
|
+
* Use to display a transient success, error, warning, or info message with an
|
|
5
|
+
* icon, title, and content. For an inline page banner with a close button, use
|
|
6
|
+
* CobreAlert instead.
|
|
7
|
+
*/
|
|
2
8
|
interface Props {
|
|
3
9
|
type: IconType;
|
|
4
10
|
content: string;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreBadge — a compact pill for statuses, labels and filter chips.
|
|
3
|
+
* Use to surface state (success/error/warning/status-*), tags, or removable filters.
|
|
4
|
+
* Provides `start`, `content` and `end` slots; `content` replaces the default `text`.
|
|
5
|
+
*/
|
|
1
6
|
interface Props {
|
|
2
7
|
type: string;
|
|
3
8
|
isSelected?: boolean;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreChips — a filter chip built on CobreButton's `filter` theme.
|
|
3
|
+
* Use to display an applied or selectable filter; shows a leading plus, icon, or a
|
|
4
|
+
* removable divider/close button that emits 'close' when a filter value is set.
|
|
5
|
+
*/
|
|
1
6
|
interface Props {
|
|
2
7
|
label?: string;
|
|
3
8
|
filterText?: string;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
type Positions = 'left' | 'right';
|
|
2
|
+
/**
|
|
3
|
+
* CobreDrawer — a side panel that slides in from the left or right edge of the screen.
|
|
4
|
+
* Use for secondary flows, filters, or detail views that overlay the page without
|
|
5
|
+
* fully blocking it. Open/close via the exposed `toggleModal` ref; closes on Escape
|
|
6
|
+
* and (optionally) on outside click. Emits `close` (auto/outside) and `close-button`
|
|
7
|
+
* (close icon). Provides `content`, `footer`, and `onlyWrapper` slots.
|
|
8
|
+
* For a centered modal dialog, use CobreModal instead.
|
|
9
|
+
*/
|
|
2
10
|
interface Props {
|
|
3
11
|
id?: string;
|
|
4
12
|
position: Positions;
|
|
@@ -2,6 +2,13 @@ interface Option {
|
|
|
2
2
|
text: string;
|
|
3
3
|
id: string;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* CobreDropdownButton — a split button that pairs a primary action with a
|
|
7
|
+
* chevron toggle that opens a dropdown action list.
|
|
8
|
+
* Use when a button has one main action plus a menu of related options.
|
|
9
|
+
* Emits `button-click` for the primary action and `clickOption` for menu selections.
|
|
10
|
+
* Provides a `content` slot to customize the primary button's label area.
|
|
11
|
+
*/
|
|
5
12
|
interface Props {
|
|
6
13
|
actionListOptions: Array<Option>;
|
|
7
14
|
label?: string;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreInput — the standard single-line text field for the Cobre platform.
|
|
3
|
+
* Use for form text entry with built-in validation (length, numeric, letters,
|
|
4
|
+
* alphanumeric, email) and inline error/info messaging. Set `isSearchable` to
|
|
5
|
+
* render the compact search variant. For multi-line input use CobreTextArea.
|
|
6
|
+
*/
|
|
1
7
|
interface Props {
|
|
2
8
|
modelValue: string | undefined | null;
|
|
3
9
|
errorMsg?: string;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreModal — a centered overlay dialog rendered over a dimmed backdrop.
|
|
3
|
+
* Use for focused interactions (confirmations, forms, details) that block the
|
|
4
|
+
* page until dismissed. Open/close via the exposed `toggleModal` ref; emits
|
|
5
|
+
* `close` when the close button is pressed. Provides a `content` slot.
|
|
6
|
+
* For a side panel that slides in from an edge, use CobreDrawer instead.
|
|
7
|
+
*/
|
|
1
8
|
interface Props {
|
|
2
9
|
size?: 'xs' | 'md' | 'lg';
|
|
3
10
|
hasCloseButton?: boolean;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import 'vue-select/dist/vue-select.css';
|
|
2
|
+
/**
|
|
3
|
+
* CobreSelect — the platform dropdown select, built on vue-select.
|
|
4
|
+
* Use for choosing from a list of options, with optional search, custom option
|
|
5
|
+
* rendering (bank logos, country flags, balances, badges) and a no-options state.
|
|
6
|
+
* Forwards extra vue-select props via attrs. Provides `option`, `selected-option`,
|
|
7
|
+
* `open-indicator`, `no-options`, `no-results`, `deselect`, `list-header`,
|
|
8
|
+
* `list-footer`, and `spinner` slots for full customization.
|
|
9
|
+
*/
|
|
2
10
|
interface Props {
|
|
3
11
|
labelName?: string;
|
|
4
12
|
isRequired?: boolean;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreSnackBar — a compact single-line snackbar for brief, transient feedback.
|
|
3
|
+
* Use for confirmations or errors, optionally with an inline action button and a
|
|
4
|
+
* close button. For a richer banner with a title, use CobreAlert/CobreToastAlert.
|
|
5
|
+
*/
|
|
1
6
|
interface Props {
|
|
2
7
|
closeToast: (e?: MouseEvent) => void;
|
|
3
8
|
message: string;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreTextArea — the standard multi-line text field for the Cobre platform.
|
|
3
|
+
* Use for longer free-form input with built-in length validation and inline
|
|
4
|
+
* error/info messaging. The height is configurable via `height`. For single-line
|
|
5
|
+
* input use CobreInput.
|
|
6
|
+
*/
|
|
1
7
|
interface Props {
|
|
2
8
|
modelValue: string | undefined | null;
|
|
3
9
|
id?: string;
|
package/dist/types/components/organisms/CobreAccountPickerModal/CobreAccountPickerModal.vue.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import { type CobreSelectableItem } from '../../molecules/CobreAccountOptionSele
|
|
|
2
2
|
import type { AlertConfig, FilterConfig, TabConfigItem } from './interfaces/account-selector-modal.interface';
|
|
3
3
|
export type { AlertType, AlertConfig, TabConfigItem, FilterOptionItem, FilterConfig } from './interfaces/account-selector-modal.interface';
|
|
4
4
|
type AccountItem = CobreSelectableItem;
|
|
5
|
+
/**
|
|
6
|
+
* CobreAccountPickerModal — a modal for searching and selecting an account or
|
|
7
|
+
* counterparty, with optional search, tabs, multi-option filters, and a balance
|
|
8
|
+
* visibility toggle. Use when the user must pick one account from a list.
|
|
9
|
+
* Open/close it via the exposed `toggleModal()`; emits `select` on choice.
|
|
10
|
+
* Provides a `custom-actions` slot for extra controls below the filters.
|
|
11
|
+
*/
|
|
5
12
|
interface Props {
|
|
6
13
|
title: string;
|
|
7
14
|
searchPlaceholder: string;
|