@vcita/design-system 0.0.12-prod.beta.27 → 0.1.2

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 (102) hide show
  1. package/README.md +30 -21
  2. package/dist/@vcita/design-system.esm.js +519 -676
  3. package/dist/@vcita/design-system.min.js +1 -1
  4. package/dist/@vcita/design-system.ssr.js +449 -608
  5. package/init/DesignSystem.js +77 -0
  6. package/init/VcSvg/VcSvg.stories.js +25 -0
  7. package/{src/components → init}/VcSvg/VcSvg.vue +0 -0
  8. package/init/vuetify.config.js +132 -0
  9. package/package.json +6 -5
  10. package/src/assets/logo.png +0 -0
  11. package/src/assets/logo.svg +1 -0
  12. package/src/components/VcActionList/VcActionList.spec.js +57 -0
  13. package/src/components/VcActionList/VcActionList.stories.js +56 -0
  14. package/src/components/VcActionList/VcActionList.vue +1 -1
  15. package/src/components/VcActions/VcActions.spec.js +153 -0
  16. package/src/components/VcActions/VcActions.stories.js +103 -0
  17. package/src/components/VcActions/VcActions.vue +14 -6
  18. package/src/components/VcAlert/VcAlert.spec.js +162 -0
  19. package/src/components/VcAlert/VcAlert.stories.js +105 -0
  20. package/src/components/VcAlert/VcAlert.vue +7 -8
  21. package/src/components/VcAutoComplete/VcAutoComplete.spec.js +67 -0
  22. package/src/components/VcAutoComplete/VcAutoComplete.stories.js +99 -0
  23. package/src/components/VcAvatar/VcAvatar.spec.js +110 -0
  24. package/src/components/VcAvatar/VcAvatar.stories.js +101 -0
  25. package/src/components/VcBottomActions/VcBottomActions.spec.js +64 -0
  26. package/src/components/VcBottomActions/VcBottomActions.stories.js +103 -0
  27. package/src/components/VcBottomActions/VcBottomActions.vue +4 -4
  28. package/src/components/VcButton/VcButton.spec.js +181 -0
  29. package/src/components/VcButton/VcButton.stories.js +123 -0
  30. package/src/components/VcButton/VcButton.stories.mdx.old +40 -0
  31. package/src/components/VcButtonGroup/VcButtonGroup.spec.js +209 -0
  32. package/src/components/VcButtonGroup/VcButtonGroup.stories.js +109 -0
  33. package/src/components/VcButtonGroup/VcButtonGroup.vue +5 -1
  34. package/src/components/VcCard/VcCard.spec.js +38 -0
  35. package/src/components/VcCard/VcCard.stories.js +28 -0
  36. package/src/components/VcCard/VcCard.vue +46 -0
  37. package/src/components/VcExpansionPanels/VcExpansionPanels.stories.js +36 -0
  38. package/src/components/VcForm/VcForm.spec.js +38 -0
  39. package/src/components/VcForm/VcForm.stories.js +44 -0
  40. package/src/components/VcHourInput/VcHourInput.stories.js +36 -0
  41. package/src/components/VcIcon/VcIcon.spec.js +38 -0
  42. package/src/components/VcIcon/VcIcon.stories.js +53 -0
  43. package/src/components/VcIconWithTooltip/VcIconWithTooltip.spec.js +156 -0
  44. package/src/components/VcIconWithTooltip/VcIconWithTooltip.stories.js +77 -0
  45. package/src/components/VcIconWithTooltip/VcIconWithTooltip.vue +7 -6
  46. package/src/components/VcLayout/VcLayout.spec.js +38 -0
  47. package/src/components/VcLayout/VcLayout.stories.js +26 -0
  48. package/src/components/VcLoader/VcLoader.spec.js +38 -0
  49. package/src/components/VcLoader/VcLoader.stories.js +30 -0
  50. package/src/components/VcLoader/VcLoader.vue +1 -1
  51. package/src/components/VcMenu/VcMenu.spec.js +38 -0
  52. package/src/components/VcMenu/VcMenu.stories.js +45 -0
  53. package/src/components/VcSwitch/VcSwitch.spec.js +38 -0
  54. package/src/components/VcSwitch/VcSwitch.stories.js +87 -0
  55. package/src/components/VcSwitch/VcSwitch.vue +14 -1
  56. package/src/components/VcTextArea/VcTextArea.spec.js +41 -0
  57. package/src/components/VcTextArea/VcTextArea.stories.js +144 -0
  58. package/src/components/VcTextArea/VcTextArea.vue +21 -10
  59. package/src/components/VcTextField/VcTextField.spec.js +170 -0
  60. package/src/components/VcTextField/VcTextField.stories.js +65 -0
  61. package/src/components/VcTextField/VcTextField.vue +4 -3
  62. package/src/components/VcToast/VcToast.spec.js +75 -0
  63. package/src/components/VcToast/VcToast.stories.js +80 -0
  64. package/src/components/VcToast/VcToast.vue +11 -15
  65. package/src/components/VcTooltip/VcTooltip.spec.js +58 -0
  66. package/src/components/VcTooltip/VcTooltip.stories.js +163 -0
  67. package/src/components/VcTooltip/VcTooltip.vue +4 -4
  68. package/src/components/index.js +26 -0
  69. package/src/components/modal/VcConfirmModal/VcConfirmModal.spec.js +48 -0
  70. package/src/components/modal/VcConfirmModal/VcConfirmModal.stories.js +142 -0
  71. package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.spec.js +49 -0
  72. package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.stories.js +53 -0
  73. package/src/components/modal/VcInputModal/VcInputModal.spec.js +79 -0
  74. package/src/components/modal/VcInputModal/VcInputModal.stories.js +188 -0
  75. package/src/components/modal/VcNoticeModal/VcNoticeModal.spec.js +54 -0
  76. package/src/components/modal/VcNoticeModal/VcNoticeModal.stories.js +136 -0
  77. package/src/components/modal/elements/VcModalContainer.spec.js +38 -0
  78. package/src/components/modal/elements/VcModalContainer.stories.js +49 -0
  79. package/src/components/modal/elements/VcModalFooter.spec.js +82 -0
  80. package/src/components/modal/elements/VcModalFooter.stories.js +47 -0
  81. package/src/components/modal/elements/VcModalHeader.spec.js +103 -0
  82. package/src/components/modal/elements/VcModalHeader.stories.js +91 -0
  83. package/src/components/modal/elements/VcModalWrapper.spec.js +38 -0
  84. package/src/components/modal/elements/VcModalWrapper.stories.js +34 -0
  85. package/src/entry.esm.js +16 -0
  86. package/src/entry.js +13 -0
  87. package/src/scss/_i18n-mixins.scss +174 -0
  88. package/src/scss/mixins.scss +7 -0
  89. package/src/stories/assets/HeaderImage.svg +9 -0
  90. package/src/stories/assets/code-brackets.svg +1 -0
  91. package/src/stories/assets/colors.svg +1 -0
  92. package/src/stories/assets/comments.svg +1 -0
  93. package/src/stories/assets/direction.svg +1 -0
  94. package/src/stories/assets/flow.svg +1 -0
  95. package/src/stories/assets/plugin.svg +1 -0
  96. package/src/stories/assets/rabbit.svg +17 -0
  97. package/src/stories/assets/repo.svg +1 -0
  98. package/src/stories/assets/stackalt.svg +1 -0
  99. package/src/stories/colors.stories.mdx +78 -0
  100. package/src/stories/welcome.stories.mdx +210 -0
  101. package/styles/variables.scss +65 -7
  102. package/utils/colorUtil.js +41 -0
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # design-system
2
2
 
3
+ link to storybook
4
+ https://vcita.github.io/design-system
5
+
3
6
  ## Goals
4
7
 
5
8
  This project's goal is to create a set of tools that will enable future development to be quicker and more standard.
@@ -15,24 +18,21 @@ Development will proceed by using the storybook.
15
18
 
16
19
  1. Input variables will be well defined and validated
17
20
  2. Components should be constructed so that they are composable - slots are your friends
18
- 3. A component will only use a vuetify component if it is the one it is wrapping. If you need any other component, it
19
- needs to first be wrapped, and then used by creating an instance of the wrapper.
20
21
 
21
22
  ### Code standards
22
23
 
23
24
  1. The component name will start with Vc and be camel cased. example: VcComponent.vue
24
- 2. Emitted events will start with "on" and be camel cased. example: 'onButtonClicked'.
25
- Except for standard events such as "click" or "input".
26
- 3. Don't use v-bind="$attrs" and v-on="$listeners", that's not the way.
27
- If you find yourself needing a lot of props, you may need to implement it using a render function instead.
28
-
25
+ 2. Emitted events will start with "on" and be camel cased. example: 'onButtonClicked'. Except for standard events such
26
+ as "click" or "input".
27
+ 3. Don't use v-bind="$attrs" and v-on="$listeners", that's not the way. If you find yourself needing a lot of props, you
28
+ may need to implement it using a render function instead.
29
29
 
30
30
  ### Guidelines and best practices
31
31
 
32
- Component name will start with 'Vc', for example VcButton.
33
-
34
32
  Every component that is created in this project should have the following things:
35
33
 
34
+ Unit test file with 100% coverage.
35
+
36
36
  A storybook page with the following data
37
37
 
38
38
  1. link to Figma page with the design of the component
@@ -67,7 +67,7 @@ Other design variables will be defined in TBD. Each project that uses this packa
67
67
  design variables, and thus control its own design. Please be thoughtful when adding and using the design variables in
68
68
  your components.
69
69
 
70
- ### Best practices
70
+ ### Styling best practices
71
71
 
72
72
  1. Values such as margins or padding will be set using css variables, so that each project can adapt the design if need
73
73
  be. The initial values will be set in the @/styles/variables.scss file.
@@ -98,20 +98,24 @@ npm run storybook
98
98
  ```
99
99
 
100
100
  ### Ongoing development
101
- In many cases, you don't want to publish the package each time you make a change.
102
- In those cases it can may life much easier to install the package directly from your branch in git.
101
+
102
+ In many cases, you don't want to publish the package each time you make a change. In those cases it can may life much
103
+ easier to install the package directly from your branch in git.
103
104
 
104
105
  ```
105
106
  npm install "https://github.com/vcita/design-system.git#branch" --save
106
107
  ```
107
108
 
108
109
  so to install from integration for example, run
110
+
109
111
  ```
110
112
  npm install "https://github.com/vcita/design-system.git#example" --save
111
113
  ```
112
- Note: before releasing, make sure to publish a version and use that in your project, or tracking version changes will become impossible.
113
114
 
114
- ### publishing the package to npm
115
+ Note: before releasing, make sure to publish a version and use that in your project, or tracking version changes will
116
+ become impossible.
117
+
118
+ ### Publishing the package to npm
115
119
 
116
120
  You may first need to run
117
121
 
@@ -151,7 +155,7 @@ npm run lint
151
155
 
152
156
  ### Initializing in your project
153
157
 
154
- You can initialize the project without changing the theme or other options
158
+ To initialize the project
155
159
 
156
160
  ```
157
161
  import DesignSystem from '@vcita/design-system';
@@ -160,16 +164,21 @@ import Vue from "vue";
160
164
  Vue.use(DesignSystem);
161
165
  ```
162
166
 
163
- Or in case you do want to adjust some values, you can do something like this
167
+ If you need to also adjust some values, such as theme or configurations, it will look something like this:
164
168
 
165
169
  ```
166
- import DesignSystem from '@vcita/design-system';
167
170
  import Vue from "vue";
171
+ import DesignSystem from '@vcita/design-system';
172
+ import DesignSystemInit from '@vcita/design-system/init/DesignSystem';
173
+
174
+ Vue.use(DesignSystem);
175
+
176
+ const config = {
177
+ theme: { primary: '#123456'},
178
+ options: {toastTimeout: 5000 }
179
+ };
168
180
 
169
- Vue.use(DesignSystem, {
170
- theme: { primary: '#123456'},
171
- options: {toastTimeout: 5000 }
172
- });
181
+ export default DesignSystemInit(config);
173
182
  ```
174
183
 
175
184
  ### Customize configuration