ctc-component-library 0.0.7 → 0.1.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.
Files changed (52) hide show
  1. package/README.md +60 -5
  2. package/dist/{style.css → index.css} +1 -1
  3. package/dist/index.d.ts +15 -5
  4. package/dist/index.es.js +9943 -451
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/atoms/Avatar/Avatar.d.ts +3 -0
  7. package/dist/src/components/atoms/Avatar/types.d.ts +7 -0
  8. package/dist/src/components/atoms/Badge/Badge.d.ts +3 -0
  9. package/dist/src/components/atoms/Badge/types.d.ts +18 -0
  10. package/dist/src/components/atoms/Button/Button.d.ts +2 -15
  11. package/dist/src/components/atoms/Button/types.d.ts +15 -0
  12. package/dist/src/components/atoms/Checkbox/Checkbox.d.ts +3 -0
  13. package/dist/src/components/atoms/Checkbox/types.d.ts +15 -0
  14. package/dist/src/components/atoms/Icon/Icon.d.ts +3 -7
  15. package/dist/src/components/atoms/Icon/types.d.ts +5 -0
  16. package/dist/src/components/atoms/Typography/Typography.d.ts +2 -9
  17. package/dist/src/components/atoms/Typography/types.d.ts +8 -0
  18. package/dist/src/components/atoms/tooltips/Tooltip/Tooltip.d.ts +3 -0
  19. package/dist/src/components/atoms/tooltips/Tooltip/types.d.ts +10 -0
  20. package/dist/src/components/atoms/tooltips/TooltipWrapper/TooltipWrapper.d.ts +3 -0
  21. package/dist/src/components/atoms/tooltips/TooltipWrapper/types.d.ts +11 -0
  22. package/dist/src/components/molecules/dropdowns/Dropdown/Dropdown.d.ts +3 -0
  23. package/dist/src/components/molecules/dropdowns/Dropdown/types.d.ts +25 -0
  24. package/dist/src/components/molecules/tabs/Tab/Tab.d.ts +3 -0
  25. package/dist/src/components/molecules/tabs/Tab/types.d.ts +16 -0
  26. package/dist/src/components/molecules/tabs/TabButton/TabButton.d.ts +3 -0
  27. package/dist/src/components/molecules/tabs/TabButton/types.d.ts +15 -0
  28. package/dist/src/vite-env.d.ts +1 -0
  29. package/package.json +9 -11
  30. package/dist/index.umd.js +0 -26
  31. package/dist/index.umd.js.map +0 -1
  32. package/dist/src/App.d.ts +0 -3
  33. package/dist/src/commons/spacing.d.ts +0 -15
  34. package/dist/src/components/atoms/Button/Button.test.d.ts +0 -1
  35. package/dist/src/components/atoms/Icon/Icon.test.d.ts +0 -1
  36. package/dist/src/components/atoms/Typography/Typography.test.d.ts +0 -1
  37. package/dist/src/components/foundationOverview/ColorOverview/ColorOverview.d.ts +0 -2
  38. package/dist/src/components/foundationOverview/ColorOverview/ColorOverview.stories.d.ts +0 -15
  39. package/dist/src/components/foundationOverview/IconsOverview/IconsOverview.d.ts +0 -3
  40. package/dist/src/components/foundationOverview/IconsOverview/IconsOverview.stories.d.ts +0 -15
  41. package/dist/src/components/foundationOverview/ShapeOverview/ShapeOverview.d.ts +0 -2
  42. package/dist/src/components/foundationOverview/ShapeOverview/ShapeOverview.stories.d.ts +0 -15
  43. package/dist/src/components/foundationOverview/SpacingOverview/SpacingOverview.d.ts +0 -2
  44. package/dist/src/components/foundationOverview/SpacingOverview/SpacingOverview.stories.d.ts +0 -15
  45. package/dist/src/components/foundationOverview/TypographyOverview/TypographyOverview.d.ts +0 -3
  46. package/dist/src/components/foundationOverview/TypographyOverview/TypographyOverview.stories.d.ts +0 -15
  47. package/dist/src/components/foundationOverview/TypographyOverview/tokens.d.ts +0 -14
  48. package/dist/src/components/index.d.ts +0 -2
  49. package/dist/src/main.d.ts +0 -1
  50. package/dist/src/stories/Button/Button.stories.d.ts +0 -15
  51. package/dist/src/stories/Typography/Typography.stories.d.ts +0 -19
  52. package/dist/vite.svg +0 -1
package/README.md CHANGED
@@ -1,37 +1,92 @@
1
1
  # ctc-component-library
2
2
 
3
3
  ## Requirements
4
- ```bash
4
+ ```
5
5
  node v18.19.1 or above
6
6
  ```
7
7
 
8
8
 
9
9
  ## Install
10
10
 
11
- ```bash
11
+ ```
12
12
  npm install --save @ctc-component-library
13
13
  ```
14
14
 
15
15
  ## Run local
16
16
 
17
- ```bash
17
+ ```
18
18
  - npm install
19
19
  - npm run storybook
20
20
  ```
21
21
 
22
22
  ## To publish
23
23
 
24
- ```bash
24
+ ```
25
25
  - Increase the version on package.json
26
26
  - Push to main branch, the actions to publish and deploy will be run
27
27
  ```
28
28
 
29
29
  ## Material Symbols demo
30
30
 
31
- ```bash
31
+ ```
32
32
  - Here you can preview all the icons
33
33
  https://marella.me/material-symbols/demo/
34
34
 
35
35
  - Usage
36
36
  https://github.com/marella/material-symbols/tree/main/material-symbols#usage
37
37
  ```
38
+
39
+ ### Installing `yalc` on Your Machine
40
+
41
+ Using NPM:
42
+ ```
43
+ npm i yalc -g
44
+ ```
45
+
46
+ Using Yarn:
47
+ ```
48
+ yarn global add yalc
49
+ ```
50
+
51
+ ## Updating the Library with yalc
52
+ Once yalc is installed, navigate to the root of the library and execute:
53
+ ```
54
+ ctc-component-library % yarn yalc:update
55
+ ```
56
+
57
+ Then, in the root of the project where the library will be installed (e.g., Backoffice), execute:
58
+
59
+ ```
60
+ ctc-backoffice-frontend % yalc add ctc-component-library
61
+ ```
62
+
63
+ ## Using the Components
64
+ Now you can use the components, for example:
65
+ ```
66
+ import { Button } from 'ctc-component-library';
67
+
68
+ const SomeForm: React.FC = () => (
69
+ <Button type="primary" text="Send" />
70
+ );
71
+ ```
72
+
73
+ This allows you to have the library installed locally, make changes or adjustments to any component in the library, and validate them immediately without having to go through the process of pull requests, merges, and deployment to NPM.
74
+
75
+ ## Updating the Library in a Project
76
+ After making a change to a component in the library, and if you need to see this change in the project consuming the library, you must build and update the package in the local yalc repository. Then, remove and add the library package again in the consuming project. To do this:
77
+
78
+ Navigate to the root of the library and execute:
79
+ ```
80
+ ctc-component-library % yarn yalc:update
81
+ ```
82
+
83
+
84
+ Navigate to the root of the project consuming the library (e.g., Backoffice) and to remove the library, execute:
85
+ ```
86
+ ctc-backoffice-frontend % yalc remove ctc-component-library
87
+ ```
88
+ Then, to add the library, execute:
89
+
90
+ ```
91
+ ctc-backoffice-frontend % yalc add ctc-component-library
92
+ ```