@cobre-npm/ds-v3 0.151.0 → 0.153.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.
@@ -1091,4 +1091,15 @@
1091
1091
  --cobre-segmented-tabs-active-bg: var(--cobre-secondary-5);
1092
1092
  --cobre-segmented-tabs-active-color: var(--cobre-primary-90);
1093
1093
  --cobre-segmented-tabs-active-border: var(--cobre-border-stroke-M) solid var(--cobre-secondary-50);
1094
+ }
1095
+
1096
+ /**
1097
+ * Filter option groups
1098
+ */
1099
+
1100
+ :root {
1101
+ --cobre-filter-option-groups-section-color: var(--cobre-primary-50);
1102
+ --cobre-filter-option-groups-label-fs: var(--cobre-label-small-fs);
1103
+ --cobre-filter-option-groups-label-lh: var(--cobre-label-small-lh);
1104
+ --cobre-filter-option-groups-label-fw: 500;
1094
1105
  }
@@ -33,10 +33,10 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
33
33
  onClick?: (() => any) | undefined;
34
34
  }>, {
35
35
  isLoading: boolean;
36
+ idPrefix: string;
36
37
  placeholderIcon: string;
37
38
  selectedAccount: CobreSelectableItem | null;
38
39
  chevronIcon: string;
39
- idPrefix: string;
40
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
41
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
42
42
  export default _default;
@@ -2,7 +2,8 @@ import type { CheckboxFilter } from '../interfaces/filter.interface';
2
2
  /**
3
3
  * FilterCheckboxList — the checkbox-group control for CobreFilterPanel: renders
4
4
  * one checkbox per option and emits the updated array of selected values when
5
- * an option is toggled. Options may carry a `logoURL` for an inline icon.
5
+ * an option is toggled. Options may carry a `logoURL` for an inline icon and a
6
+ * `subtitle`; with `sections` they are grouped under non-selectable titles.
6
7
  * Rendered internally by CobreFilterPanel for `checkbox` filters.
7
8
  */
8
9
  type __VLS_Props = {
@@ -0,0 +1,27 @@
1
+ import type { FilterOption, FilterSection } from '../interfaces/filter.interface';
2
+ type __VLS_Props = {
3
+ options: FilterOption[];
4
+ sections?: FilterSection[];
5
+ /** Prefix of each option's control id, as `${idPrefix}-${option.value}`. */
6
+ idPrefix: string;
7
+ disabled?: boolean;
8
+ };
9
+ declare var __VLS_1: {
10
+ id: string;
11
+ option: FilterOption;
12
+ label: string;
13
+ description: string | undefined;
14
+ sectioned: boolean;
15
+ disabled: boolean | undefined;
16
+ };
17
+ type __VLS_Slots = {} & {
18
+ option?: (props: typeof __VLS_1) => any;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -2,7 +2,8 @@ import type { RadioFilter } from '../interfaces/filter.interface';
2
2
  /**
3
3
  * FilterRadioList — the single-select radio-group control for CobreFilterPanel:
4
4
  * renders one radio per option and emits the chosen value on selection.
5
- * Options may carry a `logoURL` for an inline icon.
5
+ * Options may carry a `logoURL` for an inline icon and a
6
+ * `subtitle`; with `sections` they are grouped under non-selectable titles.
6
7
  * Rendered internally by CobreFilterPanel for `radio` filters.
7
8
  */
8
9
  type __VLS_Props = {
@@ -7,6 +7,12 @@ export interface FilterOption {
7
7
  /** URL of a logo/icon image shown beside the option. */
8
8
  logoURL?: string;
9
9
  disabled?: boolean;
10
+ section?: string;
11
+ subtitle?: string;
12
+ }
13
+ export interface FilterSection {
14
+ value: string;
15
+ label: string;
10
16
  }
11
17
  /** Lower/upper bounds of an amount-range filter; null means unbounded on that end. */
12
18
  export interface AmountRangeValue {
@@ -60,6 +66,7 @@ export interface CommonSearchProps {
60
66
  export interface CheckboxFilter extends BaseFilter<'checkbox'> {
61
67
  value: (string | number)[];
62
68
  options: FilterOption[];
69
+ sections?: FilterSection[];
63
70
  props?: CommonDisabledProps & CommonSearchProps;
64
71
  validation?: CommonValidation;
65
72
  }
@@ -67,6 +74,8 @@ export interface CheckboxFilter extends BaseFilter<'checkbox'> {
67
74
  export interface RadioFilter extends BaseFilter<'radio'> {
68
75
  value: string | number | null;
69
76
  options: FilterOption[];
77
+ /** Section headings, in render order. Enables the two-column grouped layout. */
78
+ sections?: FilterSection[];
70
79
  props?: CommonDisabledProps & CommonSearchProps;
71
80
  validation?: CommonValidation;
72
81
  }
@@ -0,0 +1,6 @@
1
+ import type { FilterOption, FilterSection } from '../interfaces/filter.interface';
2
+ export interface OptionGroup {
3
+ section: FilterSection | null;
4
+ options: FilterOption[];
5
+ }
6
+ export declare const groupOptionsBySection: (options: FilterOption[], sections: FilterSection[]) => OptionGroup[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/ds-v3",
3
- "version": "0.151.0",
3
+ "version": "0.153.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.0.4",
6
6
  "engines": {