@hubspot/cms-component-library 0.1.0-alpha.1
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/README.md +3 -0
- package/cli/commands/customize.ts +145 -0
- package/cli/commands/help.ts +56 -0
- package/cli/commands/version.ts +12 -0
- package/cli/index.ts +42 -0
- package/cli/tests/commands.test.ts +128 -0
- package/cli/tests/get-file.test.ts +82 -0
- package/cli/tests/version-integration.test.ts +39 -0
- package/cli/utils/cli-metadata.ts +9 -0
- package/cli/utils/component-naming.ts +76 -0
- package/cli/utils/components.ts +74 -0
- package/cli/utils/file-operations.ts +158 -0
- package/cli/utils/logging.ts +13 -0
- package/cli/utils/prompts.ts +80 -0
- package/cli/utils/version.ts +33 -0
- package/components/componentLibrary/Button/index.module.scss +9 -0
- package/components/componentLibrary/Button/index.tsx +83 -0
- package/components/componentLibrary/Button/scaffolds/fields.tsx.template +70 -0
- package/components/componentLibrary/Button/scaffolds/index.ts.template +95 -0
- package/components/componentLibrary/Heading/index.module.scss +9 -0
- package/components/componentLibrary/Heading/index.tsx +34 -0
- package/components/componentLibrary/Heading/scaffolds/fields.tsx.template +62 -0
- package/components/componentLibrary/Heading/scaffolds/index.ts.template +46 -0
- package/components/componentLibrary/index.ts +1 -0
- package/components/componentLibrary/styles/_component-base.scss +246 -0
- package/components/componentLibrary/types/index.ts +308 -0
- package/components/componentLibrary/utils/chainApi/choiceFieldGenerator.tsx +64 -0
- package/components/componentLibrary/utils/chainApi/index.ts +115 -0
- package/components/componentLibrary/utils/chainApi/labelGenerator.ts +76 -0
- package/components/componentLibrary/utils/chainApi/stateManager.ts +178 -0
- package/components/componentLibrary/utils/classname.ts +40 -0
- package/components/componentLibrary/utils/createConditionalClasses.ts +44 -0
- package/components/componentLibrary/utils/createHsclComponent.tsx +167 -0
- package/components/componentLibrary/utils/propResolution/createCssVariables.ts +58 -0
- package/components/componentLibrary/utils/propResolution/propResolutionUtils.ts +113 -0
- package/components/componentLibrary/utils/storybook/standardArgs.ts +607 -0
- package/package.json +62 -0
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hubspot/cms-component-library",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "HubSpot CMS React component library for building CMS modules",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "index.ts",
|
|
7
|
+
"types": "index.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.ts",
|
|
11
|
+
"import": "./index.ts",
|
|
12
|
+
"require": "./index.ts"
|
|
13
|
+
},
|
|
14
|
+
"./*": {
|
|
15
|
+
"types": "./components/componentLibrary/*/index.tsx",
|
|
16
|
+
"import": "./components/componentLibrary/*/index.tsx"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"hscl": "./cli/index.ts"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"index.ts",
|
|
24
|
+
"components/componentLibrary/",
|
|
25
|
+
"cli/",
|
|
26
|
+
"!components/componentLibrary/**/stories/",
|
|
27
|
+
"!components/componentLibrary/demo/"
|
|
28
|
+
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git@git.hubteam.com:HubSpot/cms-component-library.git"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"type": "module",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@hubspot/cms-components": "^1.0.37",
|
|
39
|
+
"chalk": "^5.6.2",
|
|
40
|
+
"commander": "^12.0.0",
|
|
41
|
+
"prompts": "^2.4.0",
|
|
42
|
+
"sass-embedded": "^1.90.0",
|
|
43
|
+
"tsx": "^4.20.5"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^18.3.1"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^20.0.0",
|
|
50
|
+
"@types/prompts": "^2.4.0",
|
|
51
|
+
"@vitejs/plugin-react": "4.6.0",
|
|
52
|
+
"typescript": "^5.0.0"
|
|
53
|
+
},
|
|
54
|
+
"author": "content-assets",
|
|
55
|
+
"keywords": [
|
|
56
|
+
"hubspot",
|
|
57
|
+
"cms",
|
|
58
|
+
"react",
|
|
59
|
+
"components",
|
|
60
|
+
"typescript"
|
|
61
|
+
]
|
|
62
|
+
}
|