@commercelayer/app-elements 0.0.35 → 0.0.37

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.
@@ -0,0 +1,20 @@
1
+ export declare function useToggleCheckboxValues(defaultValues: string[]): {
2
+ values: string[];
3
+ toggleValue: (value: string) => void;
4
+ setValues: (values: string[]) => void;
5
+ };
6
+ /**
7
+ * Simple helper to add the counter for selected options to a label
8
+ * or just the total of available options when nothing is selected
9
+ * @param options
10
+ * @returns string
11
+ *
12
+ * @example
13
+ * "Markets · 2 of 4"
14
+ * "Markets · 4"
15
+ */
16
+ export declare function computeLabelWithSelected({ label, selectedCount, totalCount }: {
17
+ label: string;
18
+ selectedCount: number;
19
+ totalCount?: number;
20
+ }): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -59,10 +59,12 @@
59
59
  "typescript": "^5.0.3",
60
60
  "vite": "^4.2.1",
61
61
  "vite-plugin-dts": "^2.2.0",
62
- "vitest": "^0.29.8"
62
+ "vitest": "^0.29.8",
63
+ "wouter": "^2.11.0"
63
64
  },
64
65
  "peerDependencies": {
65
- "@commercelayer/sdk": "^5.x"
66
+ "@commercelayer/sdk": "^5.x",
67
+ "wouter": "^2.x"
66
68
  },
67
69
  "scripts": {
68
70
  "build": "tsc && vite build",