@chayns-components/core 5.2.5 → 5.2.8

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.
Files changed (55) hide show
  1. package/lib/cjs/components/combobox/ComboBox.constants.js +15 -0
  2. package/lib/cjs/components/combobox/ComboBox.constants.js.map +1 -0
  3. package/lib/cjs/components/combobox/ComboBox.js +27 -76
  4. package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
  5. package/lib/cjs/components/combobox/ComboBox.styles.js +16 -11
  6. package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
  7. package/lib/cjs/components/combobox/ComboBox.types.js +24 -0
  8. package/lib/cjs/components/combobox/ComboBox.types.js.map +1 -1
  9. package/lib/cjs/components/combobox/ComboBox.utils.js +88 -0
  10. package/lib/cjs/components/combobox/ComboBox.utils.js.map +1 -0
  11. package/lib/cjs/components/filter/filter-content/FilterContent.constants.js +8 -0
  12. package/lib/cjs/components/filter/filter-content/FilterContent.constants.js.map +1 -0
  13. package/lib/cjs/components/filter/filter-content/FilterContent.js +6 -27
  14. package/lib/cjs/components/filter/filter-content/FilterContent.js.map +1 -1
  15. package/lib/cjs/components/filter/filter-content/FilterContent.styles.js +10 -24
  16. package/lib/cjs/components/filter/filter-content/FilterContent.styles.js.map +1 -1
  17. package/lib/cjs/components/filter/filter-content/FilterContent.types.js +6 -0
  18. package/lib/cjs/components/filter/filter-content/FilterContent.types.js.map +1 -0
  19. package/lib/cjs/components/filter/filter-content/FilterContent.utils.js +17 -0
  20. package/lib/cjs/components/filter/filter-content/FilterContent.utils.js.map +1 -0
  21. package/lib/cjs/types/filter.js +24 -0
  22. package/lib/cjs/types/filter.js.map +1 -1
  23. package/lib/esm/components/combobox/ComboBox.constants.js +9 -0
  24. package/lib/esm/components/combobox/ComboBox.constants.js.map +1 -0
  25. package/lib/esm/components/combobox/ComboBox.js +27 -75
  26. package/lib/esm/components/combobox/ComboBox.js.map +1 -1
  27. package/lib/esm/components/combobox/ComboBox.styles.js +16 -11
  28. package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
  29. package/lib/esm/components/combobox/ComboBox.types.js +29 -0
  30. package/lib/esm/components/combobox/ComboBox.types.js.map +1 -1
  31. package/lib/esm/components/combobox/ComboBox.utils.js +81 -0
  32. package/lib/esm/components/combobox/ComboBox.utils.js.map +1 -0
  33. package/lib/esm/components/filter/filter-content/FilterContent.constants.js +2 -0
  34. package/lib/esm/components/filter/filter-content/FilterContent.constants.js.map +1 -0
  35. package/lib/esm/components/filter/filter-content/FilterContent.js +8 -29
  36. package/lib/esm/components/filter/filter-content/FilterContent.js.map +1 -1
  37. package/lib/esm/components/filter/filter-content/FilterContent.styles.js +9 -23
  38. package/lib/esm/components/filter/filter-content/FilterContent.styles.js.map +1 -1
  39. package/lib/esm/components/filter/filter-content/FilterContent.types.js +2 -0
  40. package/lib/esm/components/filter/filter-content/FilterContent.types.js.map +1 -0
  41. package/lib/esm/components/filter/filter-content/FilterContent.utils.js +10 -0
  42. package/lib/esm/components/filter/filter-content/FilterContent.utils.js.map +1 -0
  43. package/lib/esm/types/filter.js +31 -0
  44. package/lib/esm/types/filter.js.map +1 -1
  45. package/lib/types/components/combobox/ComboBox.constants.d.ts +8 -0
  46. package/lib/types/components/combobox/ComboBox.styles.d.ts +4 -8
  47. package/lib/types/components/combobox/ComboBox.types.d.ts +102 -0
  48. package/lib/types/components/combobox/ComboBox.utils.d.ts +23 -0
  49. package/lib/types/components/filter/filter-content/FilterContent.constants.d.ts +1 -0
  50. package/lib/types/components/filter/filter-content/FilterContent.d.ts +1 -9
  51. package/lib/types/components/filter/filter-content/FilterContent.styles.d.ts +3 -14
  52. package/lib/types/components/filter/filter-content/FilterContent.types.d.ts +30 -0
  53. package/lib/types/components/filter/filter-content/FilterContent.utils.d.ts +3 -0
  54. package/lib/types/types/filter.d.ts +51 -0
  55. package/package.json +2 -2
@@ -1,28 +1,79 @@
1
1
  import { FilterButtonsProps } from '../components/filter-buttons/FilterButtons';
2
2
  import { CheckboxProps } from '../components/checkbox/Checkbox';
3
3
  import { ComboBoxProps } from '../components/combobox/ComboBox.types';
4
+ /**
5
+ * Search configuration for the `Filter` component.
6
+ */
4
7
  export interface SearchConfig {
8
+ /**
9
+ * Callback invoked whenever the search input changes.
10
+ */
5
11
  onSearchChange: (search: string) => void;
12
+ /**
13
+ * Current search value.
14
+ */
6
15
  searchValue: string;
7
16
  }
17
+ /**
18
+ * Item configuration used by the sort dropdown.
19
+ */
8
20
  export interface SortItem {
21
+ /**
22
+ * Display text of the item.
23
+ */
9
24
  text: string;
25
+ /**
26
+ * Stable value or identifier of the item.
27
+ */
10
28
  id: string | number;
11
29
  }
30
+ /**
31
+ * Sort configuration for the `Filter` component.
32
+ */
12
33
  export interface SortConfig {
34
+ /**
35
+ * Callback invoked when a sort item is selected.
36
+ */
13
37
  onSortChange: (item: SortItem) => void;
38
+ /**
39
+ * Currently selected sort item.
40
+ */
14
41
  selectedItem: SortItem;
42
+ /**
43
+ * Available sort items.
44
+ */
15
45
  items: SortItem[];
16
46
  }
47
+ /**
48
+ * Checkbox configuration for the `Filter` component.
49
+ */
17
50
  export type CheckboxConfig = CheckboxProps;
51
+ /**
52
+ * Filter button group configuration for the `Filter` component.
53
+ */
18
54
  export type FilterButtonConfig = FilterButtonsProps;
55
+ /**
56
+ * Combobox configuration used by `FilterContent`.
57
+ */
19
58
  export type ComboboxConfig = ComboBoxProps & {
20
59
  label: string;
21
60
  };
61
+ /**
62
+ * Ref interface for the `Filter` component.
63
+ */
22
64
  export type FilterRef = {
65
+ /**
66
+ * Hides the filter popup.
67
+ */
23
68
  hide: VoidFunction;
69
+ /**
70
+ * Shows the filter popup.
71
+ */
24
72
  show: VoidFunction;
25
73
  };
74
+ /**
75
+ * Different layout modes supported by the `Filter` component.
76
+ */
26
77
  export declare enum FilterType {
27
78
  ONLY_SEARCH = 0,
28
79
  ONLY_FILTER = 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.2.5",
3
+ "version": "5.2.8",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "0b2c4471ad3dfb85b9881578c30b09bb9e9d782e"
91
+ "gitHead": "e5e85b31aac323874390c57012e5241c802670eb"
92
92
  }