@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.
- package/README.md +30 -21
- package/dist/@vcita/design-system.esm.js +519 -676
- package/dist/@vcita/design-system.min.js +1 -1
- package/dist/@vcita/design-system.ssr.js +449 -608
- package/init/DesignSystem.js +77 -0
- package/init/VcSvg/VcSvg.stories.js +25 -0
- package/{src/components → init}/VcSvg/VcSvg.vue +0 -0
- package/init/vuetify.config.js +132 -0
- package/package.json +6 -5
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/components/VcActionList/VcActionList.spec.js +57 -0
- package/src/components/VcActionList/VcActionList.stories.js +56 -0
- package/src/components/VcActionList/VcActionList.vue +1 -1
- package/src/components/VcActions/VcActions.spec.js +153 -0
- package/src/components/VcActions/VcActions.stories.js +103 -0
- package/src/components/VcActions/VcActions.vue +14 -6
- package/src/components/VcAlert/VcAlert.spec.js +162 -0
- package/src/components/VcAlert/VcAlert.stories.js +105 -0
- package/src/components/VcAlert/VcAlert.vue +7 -8
- package/src/components/VcAutoComplete/VcAutoComplete.spec.js +67 -0
- package/src/components/VcAutoComplete/VcAutoComplete.stories.js +99 -0
- package/src/components/VcAvatar/VcAvatar.spec.js +110 -0
- package/src/components/VcAvatar/VcAvatar.stories.js +101 -0
- package/src/components/VcBottomActions/VcBottomActions.spec.js +64 -0
- package/src/components/VcBottomActions/VcBottomActions.stories.js +103 -0
- package/src/components/VcBottomActions/VcBottomActions.vue +4 -4
- package/src/components/VcButton/VcButton.spec.js +181 -0
- package/src/components/VcButton/VcButton.stories.js +123 -0
- package/src/components/VcButton/VcButton.stories.mdx.old +40 -0
- package/src/components/VcButtonGroup/VcButtonGroup.spec.js +209 -0
- package/src/components/VcButtonGroup/VcButtonGroup.stories.js +109 -0
- package/src/components/VcButtonGroup/VcButtonGroup.vue +5 -1
- package/src/components/VcCard/VcCard.spec.js +38 -0
- package/src/components/VcCard/VcCard.stories.js +28 -0
- package/src/components/VcCard/VcCard.vue +46 -0
- package/src/components/VcExpansionPanels/VcExpansionPanels.stories.js +36 -0
- package/src/components/VcForm/VcForm.spec.js +38 -0
- package/src/components/VcForm/VcForm.stories.js +44 -0
- package/src/components/VcHourInput/VcHourInput.stories.js +36 -0
- package/src/components/VcIcon/VcIcon.spec.js +38 -0
- package/src/components/VcIcon/VcIcon.stories.js +53 -0
- package/src/components/VcIconWithTooltip/VcIconWithTooltip.spec.js +156 -0
- package/src/components/VcIconWithTooltip/VcIconWithTooltip.stories.js +77 -0
- package/src/components/VcIconWithTooltip/VcIconWithTooltip.vue +7 -6
- package/src/components/VcLayout/VcLayout.spec.js +38 -0
- package/src/components/VcLayout/VcLayout.stories.js +26 -0
- package/src/components/VcLoader/VcLoader.spec.js +38 -0
- package/src/components/VcLoader/VcLoader.stories.js +30 -0
- package/src/components/VcLoader/VcLoader.vue +1 -1
- package/src/components/VcMenu/VcMenu.spec.js +38 -0
- package/src/components/VcMenu/VcMenu.stories.js +45 -0
- package/src/components/VcSwitch/VcSwitch.spec.js +38 -0
- package/src/components/VcSwitch/VcSwitch.stories.js +87 -0
- package/src/components/VcSwitch/VcSwitch.vue +14 -1
- package/src/components/VcTextArea/VcTextArea.spec.js +41 -0
- package/src/components/VcTextArea/VcTextArea.stories.js +144 -0
- package/src/components/VcTextArea/VcTextArea.vue +21 -10
- package/src/components/VcTextField/VcTextField.spec.js +170 -0
- package/src/components/VcTextField/VcTextField.stories.js +65 -0
- package/src/components/VcTextField/VcTextField.vue +4 -3
- package/src/components/VcToast/VcToast.spec.js +75 -0
- package/src/components/VcToast/VcToast.stories.js +80 -0
- package/src/components/VcToast/VcToast.vue +11 -15
- package/src/components/VcTooltip/VcTooltip.spec.js +58 -0
- package/src/components/VcTooltip/VcTooltip.stories.js +163 -0
- package/src/components/VcTooltip/VcTooltip.vue +4 -4
- package/src/components/index.js +26 -0
- package/src/components/modal/VcConfirmModal/VcConfirmModal.spec.js +48 -0
- package/src/components/modal/VcConfirmModal/VcConfirmModal.stories.js +142 -0
- package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.spec.js +49 -0
- package/src/components/modal/VcConfirmProminentModal/VcConfirmProminentModal.stories.js +53 -0
- package/src/components/modal/VcInputModal/VcInputModal.spec.js +79 -0
- package/src/components/modal/VcInputModal/VcInputModal.stories.js +188 -0
- package/src/components/modal/VcNoticeModal/VcNoticeModal.spec.js +54 -0
- package/src/components/modal/VcNoticeModal/VcNoticeModal.stories.js +136 -0
- package/src/components/modal/elements/VcModalContainer.spec.js +38 -0
- package/src/components/modal/elements/VcModalContainer.stories.js +49 -0
- package/src/components/modal/elements/VcModalFooter.spec.js +82 -0
- package/src/components/modal/elements/VcModalFooter.stories.js +47 -0
- package/src/components/modal/elements/VcModalHeader.spec.js +103 -0
- package/src/components/modal/elements/VcModalHeader.stories.js +91 -0
- package/src/components/modal/elements/VcModalWrapper.spec.js +38 -0
- package/src/components/modal/elements/VcModalWrapper.stories.js +34 -0
- package/src/entry.esm.js +16 -0
- package/src/entry.js +13 -0
- package/src/scss/_i18n-mixins.scss +174 -0
- package/src/scss/mixins.scss +7 -0
- package/src/stories/assets/HeaderImage.svg +9 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/rabbit.svg +17 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/colors.stories.mdx +78 -0
- package/src/stories/welcome.stories.mdx +210 -0
- package/styles/variables.scss +65 -7
- 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
|
-
|
|
26
|
-
3. Don't use v-bind="$attrs" and v-on="$listeners", that's not the way.
|
|
27
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
102
|
-
In
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
170
|
-
theme: { primary: '#123456'},
|
|
171
|
-
options: {toastTimeout: 5000 }
|
|
172
|
-
});
|
|
181
|
+
export default DesignSystemInit(config);
|
|
173
182
|
```
|
|
174
183
|
|
|
175
184
|
### Customize configuration
|