@cobre-npm/ds-v3 0.156.0 → 0.158.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.
@@ -1104,4 +1104,27 @@
1104
1104
  --cobre-filter-option-groups-label-fs: var(--cobre-label-small-fs);
1105
1105
  --cobre-filter-option-groups-label-lh: var(--cobre-label-small-lh);
1106
1106
  --cobre-filter-option-groups-label-fw: 500;
1107
- }
1107
+ --cobre-filter-option-groups-option-color: var(--cobre-gray-95);
1108
+ }
1109
+
1110
+ /**
1111
+ * Filter panel
1112
+ */
1113
+
1114
+ :root {
1115
+ --cobre-filter-panel-width: 650px;
1116
+ --cobre-filter-panel-max-height: 500px;
1117
+ --cobre-filter-panel-padding-x: 20px;
1118
+ --cobre-filter-panel-padding-y: 16px;
1119
+ --cobre-filter-panel-tab-edge-width: 4px;
1120
+ --cobre-filter-panel-content-gap: 12px;
1121
+ --cobre-filter-panel-tab-badge-padding-x: 5px;
1122
+ --cobre-filter-panel-tab-active-bg: var(--cobre-teal-5);
1123
+ --cobre-filter-panel-tab-active-border-color: var(--cobre-teal-20);
1124
+ --cobre-filter-panel-tab-active-color: var(--cobre-teal-50);
1125
+ --cobre-filter-panel-tab-badge-bg: var(--cobre-teal-50);
1126
+ --cobre-filter-panel-tab-badge-color: var(--cobre-white);
1127
+ --cobre-filter-panel-divider-color: var(--cobre-gray-20);
1128
+ --cobre-filter-panel-section-title-color: var(--cobre-gray-60);
1129
+ --cobre-filter-panel-tab-color: var(--cobre-primary-80);
1130
+ }
@@ -4,8 +4,11 @@ import type { Filter } from './interfaces/filter.interface';
4
4
  * filter) and the active filter's control on the right, rendered from the
5
5
  * declarative `filters` array (checkbox, radio, input, amount-range, select).
6
6
  * Use to filter a table/list by several dimensions at once; the parent owns
7
- * filter values/state via the `filter-updated`/`filter-search`/`filter-cleared`
7
+ * filter values/state via the `filter-updated`/`filter-search`/`filter-local-search-result`/`filter-cleared`
8
8
  * events. Exposes `areFiltersValid()` and `reset()`.
9
+ *
10
+ * `filter-search` is the remote search (the parent fetches options for the typed text);
11
+ * `filter-local-search-result` only reports a local search the panel already ran itself.
9
12
  */
10
13
  interface Props {
11
14
  filters?: Filter[];
@@ -30,6 +33,11 @@ declare const _default: import("vue").DefineComponent<Props, {
30
33
  key: string;
31
34
  value: string;
32
35
  }) => any;
36
+ "filter-local-search-result": (payload: {
37
+ key: string;
38
+ query: string;
39
+ hasResults: boolean;
40
+ }) => any;
33
41
  "filter-cleared": (payload: {
34
42
  key: string;
35
43
  }) => any;
@@ -44,6 +52,11 @@ declare const _default: import("vue").DefineComponent<Props, {
44
52
  key: string;
45
53
  value: string;
46
54
  }) => any) | undefined;
55
+ "onFilter-local-search-result"?: ((payload: {
56
+ key: string;
57
+ query: string;
58
+ hasResults: boolean;
59
+ }) => any) | undefined;
47
60
  "onFilter-cleared"?: ((payload: {
48
61
  key: string;
49
62
  }) => any) | undefined;
@@ -13,7 +13,6 @@ declare var __VLS_1: {
13
13
  option: FilterOption;
14
14
  label: string;
15
15
  description: string | undefined;
16
- sectioned: boolean;
17
16
  disabled: boolean | undefined;
18
17
  };
19
18
  type __VLS_Slots = {} & {
@@ -62,7 +62,8 @@ export interface CommonSearchProps {
62
62
  searchable?: boolean;
63
63
  /**
64
64
  * `remote` (default) emits `filter-search` on every keystroke so the consumer fetches matches;
65
- * `local` narrows the options already loaded by label, without emitting.
65
+ * `local` narrows the options already loaded by label or subtitle and emits `filter-local-search-result`
66
+ * (query + whether anything matched) instead of `filter-search`.
66
67
  */
67
68
  searchMode?: 'remote' | 'local';
68
69
  /** Configuration for the option search box. */
@@ -4,7 +4,7 @@ export declare const DEFAULT_MIN_CHARS = 3;
4
4
  export declare const normalizeForSearch: (text: string) => string;
5
5
  /** Whether the text is long enough (after trimming) to filter by. Blank text never is. */
6
6
  export declare const isSearchActive: (text: string | undefined, minChars?: number) => boolean;
7
- /** The options whose label contains `query`, ignoring case, accents and surrounding spaces. */
7
+ /** The options whose label or subtitle contains `query`, ignoring case, accents and surrounding spaces. */
8
8
  export declare const matchOptions: (options: FilterOption[], query: string) => FilterOption[];
9
9
  /**
10
10
  * The list shown while a local search is active, in place of the tabs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/ds-v3",
3
- "version": "0.156.0",
3
+ "version": "0.158.0",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.0.4",
6
6
  "engines": {