ui-thing 0.0.11 → 0.0.13
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/CHANGELOG.md +26 -0
- package/dist/index.js +8505 -114
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/add.ts +1 -4
- package/src/comps.ts +2307 -0
- package/src/utils/promptForComponents.ts +19 -23
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import ora from "ora";
|
|
2
|
-
import prompts from "prompts";
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export const promptUserForComponents = async (): Promise<string[]> => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
return components;
|
|
23
|
-
};
|
|
1
|
+
import ora from "ora";
|
|
2
|
+
import prompts from "prompts";
|
|
3
|
+
|
|
4
|
+
import allComponents from "../comps";
|
|
5
|
+
import { Component } from "../types";
|
|
6
|
+
|
|
7
|
+
export const promptUserForComponents = async (): Promise<string[]> => {
|
|
8
|
+
const { components } = await prompts({
|
|
9
|
+
type: "autocompleteMultiselect",
|
|
10
|
+
name: "components",
|
|
11
|
+
message: "Select the components you want to add",
|
|
12
|
+
choices: allComponents.map((c: Component) => ({ title: c.name, value: c.value })),
|
|
13
|
+
onRender(kleur) {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
this.msg = kleur.bgCyan(" Choose components ") + " Select the components you want to add";
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
return components;
|
|
19
|
+
};
|