@propelinc/citrus-ui 0.2.6 → 0.2.7
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/.nvmrc +1 -0
- package/README.md +82 -15
- package/dist/citrus-ui.common.js +27 -27
- package/dist/citrus-ui.common.js.map +1 -1
- package/dist/citrus-ui.css +1 -1
- package/dist/citrus-ui.umd.js +27 -27
- package/dist/citrus-ui.umd.js.map +1 -1
- package/dist/citrus-ui.umd.min.js +3 -3
- package/dist/citrus-ui.umd.min.js.map +1 -1
- package/package.json +4 -4
- package/src/components/CAlert.vue +6 -7
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
14.16.1
|
package/README.md
CHANGED
|
@@ -1,29 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Citrus UI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Propel's UI component library.
|
|
4
|
+
|
|
5
|
+
See what components are currently available in [Storybook](https://storybook.providersapp.com/).
|
|
6
|
+
|
|
7
|
+
Also, see the Citrus UI slack channel #proj-citrus-design-system.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
```bash
|
|
12
|
+
nvm use # Switches to the correct version of node
|
|
13
|
+
npm install # Install dependencies
|
|
9
14
|
```
|
|
10
|
-
|
|
15
|
+
|
|
16
|
+
### VSCode Setup
|
|
17
|
+
|
|
18
|
+
First, install:
|
|
19
|
+
|
|
20
|
+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - highlights ESLint errors in your editor
|
|
21
|
+
- [Stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) - highligths Stylelint errors in your editor
|
|
22
|
+
|
|
23
|
+
Once you install the ESLint and Stylelint extensions, VSCode can fix lint errors when you save a file.
|
|
24
|
+
|
|
25
|
+
To set this up:
|
|
26
|
+
|
|
27
|
+
1. Head over to your VSCode settings
|
|
28
|
+
2. Search for `editor.codeActionsOnSave` and click "Edit in settings.json"
|
|
29
|
+
3. Add this configuration:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
"editor.codeActionsOnSave": {
|
|
33
|
+
"source.fixAll.eslint": true,
|
|
34
|
+
"source.fixAll.stylelint": true,
|
|
35
|
+
},
|
|
11
36
|
```
|
|
12
37
|
|
|
13
|
-
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
|
+
### Storybook
|
|
41
|
+
|
|
42
|
+
Unlike a normal Vue project, we don't use a dev server to compile an app. Instead, we rely on [Storybook](https://storybook.js.org/) to render and manually test our components.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run serve:storybook
|
|
14
47
|
```
|
|
15
|
-
|
|
48
|
+
|
|
49
|
+
### Testing
|
|
50
|
+
|
|
51
|
+
Since there is no app to test, there are no e2e tests. Instead, all tests are written in jest. You can make sure you components render correctly using Storybook.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm run test:unit
|
|
16
55
|
```
|
|
17
56
|
|
|
18
|
-
###
|
|
57
|
+
### Linting
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm run lint:js # Runs ESLint + Prettier
|
|
61
|
+
npm run lint:css # Runs Stylelint
|
|
19
62
|
```
|
|
20
|
-
|
|
63
|
+
|
|
64
|
+
### Adding a component
|
|
65
|
+
|
|
66
|
+
To add a new component, first generate the component with plop.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run generate:component # Interactive CLI
|
|
70
|
+
npm run generate:component -- [name] [directory] [document in storybook] # Shortcuts
|
|
21
71
|
```
|
|
22
72
|
|
|
23
|
-
|
|
73
|
+
❗️ If you want the component to be available to your Vue app, you'll need to add the component to [index.ts](https://github.com/propelinc/citrus-ui/blob/main/src/index.ts) and define the type in [index.d.ts](https://github.com/propelinc/citrus-ui/blob/main/src/index.d.ts).
|
|
74
|
+
|
|
75
|
+
## Publishing
|
|
76
|
+
|
|
77
|
+
When publishing a new version, bump the version in the package.json according to [semantic versioning](https://semver.org/)
|
|
78
|
+
.
|
|
79
|
+
|
|
80
|
+
Then, run:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run publish:dist
|
|
24
84
|
```
|
|
25
|
-
|
|
85
|
+
|
|
86
|
+
Finally, announce the new version in #proj-citrus-design-system.
|
|
87
|
+
|
|
88
|
+
### NPM Access
|
|
89
|
+
|
|
90
|
+
Because this package is published to our internal NPM repository, you'll need an [NPM account](https://www.npmjs.com/) and to be part of the [@propelinc organization](https://www.npmjs.com/org/propelinc) to publish. Once you have that set up, you'll have to login:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm login --scope=@propelinc
|
|
26
94
|
```
|
|
27
95
|
|
|
28
|
-
|
|
29
|
-
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
96
|
+
Or alternatively, just ask Mohan to publish for you.
|
package/dist/citrus-ui.common.js
CHANGED
|
@@ -947,6 +947,13 @@ if (v8) {
|
|
|
947
947
|
module.exports = version && +version;
|
|
948
948
|
|
|
949
949
|
|
|
950
|
+
/***/ }),
|
|
951
|
+
|
|
952
|
+
/***/ "3166":
|
|
953
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
954
|
+
|
|
955
|
+
// extracted by mini-css-extract-plugin
|
|
956
|
+
|
|
950
957
|
/***/ }),
|
|
951
958
|
|
|
952
959
|
/***/ "3410":
|
|
@@ -1407,17 +1414,6 @@ $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
|
|
|
1407
1414
|
|
|
1408
1415
|
// extracted by mini-css-extract-plugin
|
|
1409
1416
|
|
|
1410
|
-
/***/ }),
|
|
1411
|
-
|
|
1412
|
-
/***/ "4c8b":
|
|
1413
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1414
|
-
|
|
1415
|
-
"use strict";
|
|
1416
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_0c8a34d6_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6d8e");
|
|
1417
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_0c8a34d6_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_0c8a34d6_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
1418
|
-
/* unused harmony reexport * */
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
1417
|
/***/ }),
|
|
1422
1418
|
|
|
1423
1419
|
/***/ "4d64":
|
|
@@ -2060,13 +2056,6 @@ module.exports = {
|
|
|
2060
2056
|
|
|
2061
2057
|
/***/ }),
|
|
2062
2058
|
|
|
2063
|
-
/***/ "6d8e":
|
|
2064
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
2065
|
-
|
|
2066
|
-
// extracted by mini-css-extract-plugin
|
|
2067
|
-
|
|
2068
|
-
/***/ }),
|
|
2069
|
-
|
|
2070
2059
|
/***/ "6ece":
|
|
2071
2060
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2072
2061
|
|
|
@@ -5595,6 +5584,17 @@ module.exports = !fails(function () {
|
|
|
5595
5584
|
});
|
|
5596
5585
|
|
|
5597
5586
|
|
|
5587
|
+
/***/ }),
|
|
5588
|
+
|
|
5589
|
+
/***/ "e1e1":
|
|
5590
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5591
|
+
|
|
5592
|
+
"use strict";
|
|
5593
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_63c332ca_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3166");
|
|
5594
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_63c332ca_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_CAlert_vue_vue_type_style_index_0_id_63c332ca_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
5595
|
+
/* unused harmony reexport * */
|
|
5596
|
+
|
|
5597
|
+
|
|
5598
5598
|
/***/ }),
|
|
5599
5599
|
|
|
5600
5600
|
/***/ "e260":
|
|
@@ -8442,15 +8442,15 @@ var Theme = {
|
|
|
8442
8442
|
'purple': colors['color-purple']
|
|
8443
8443
|
};
|
|
8444
8444
|
/* harmony default export */ var theme = (Theme);
|
|
8445
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26ba0986-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CAlert.vue?vue&type=template&id=
|
|
8446
|
-
var
|
|
8447
|
-
'
|
|
8448
|
-
'
|
|
8445
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"26ba0986-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/CAlert.vue?vue&type=template&id=63c332ca&scoped=true&
|
|
8446
|
+
var CAlertvue_type_template_id_63c332ca_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-snackbar',{staticClass:"c-alert",class:{
|
|
8447
|
+
'c-alert--error': _vm.error,
|
|
8448
|
+
'c-alert--success': _vm.success,
|
|
8449
8449
|
},attrs:{"data-test":"alert","top":"","timeout":_vm.timeout,"value":_vm.value},on:{"input":function (value) { return _vm.$emit('input', value); }}},[_c('div',{attrs:{"data-test":"alert-message"}},[_vm._t("default",[_vm._v(" "+_vm._s(_vm.message)+" ")])],2),(!_vm.shouldAutoDismiss)?_c('c-icon-button',{attrs:{"data-test":"alert-dismiss","light":"","icon":_vm.faTimes},on:{"click":function($event){return _vm.$emit('input', false)}}}):_vm._e()],1)}
|
|
8450
8450
|
var staticRenderFns = []
|
|
8451
8451
|
|
|
8452
8452
|
|
|
8453
|
-
// CONCATENATED MODULE: ./src/components/CAlert.vue?vue&type=template&id=
|
|
8453
|
+
// CONCATENATED MODULE: ./src/components/CAlert.vue?vue&type=template&id=63c332ca&scoped=true&
|
|
8454
8454
|
|
|
8455
8455
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
8456
8456
|
function _classCallCheck(instance, Constructor) {
|
|
@@ -23024,8 +23024,8 @@ CAlertvue_type_script_lang_ts_CAlert = __decorate([vue_class_component_esm({
|
|
|
23024
23024
|
/* harmony default export */ var CAlertvue_type_script_lang_ts_ = (CAlertvue_type_script_lang_ts_CAlert);
|
|
23025
23025
|
// CONCATENATED MODULE: ./src/components/CAlert.vue?vue&type=script&lang=ts&
|
|
23026
23026
|
/* harmony default export */ var components_CAlertvue_type_script_lang_ts_ = (CAlertvue_type_script_lang_ts_);
|
|
23027
|
-
// EXTERNAL MODULE: ./src/components/CAlert.vue?vue&type=style&index=0&id=
|
|
23028
|
-
var
|
|
23027
|
+
// EXTERNAL MODULE: ./src/components/CAlert.vue?vue&type=style&index=0&id=63c332ca&lang=less&scoped=true&
|
|
23028
|
+
var CAlertvue_type_style_index_0_id_63c332ca_lang_less_scoped_true_ = __webpack_require__("e1e1");
|
|
23029
23029
|
|
|
23030
23030
|
// EXTERNAL MODULE: ./node_modules/vuetify/src/components/VSnackbar/VSnackbar.sass
|
|
23031
23031
|
var VSnackbar = __webpack_require__("ca71");
|
|
@@ -23129,11 +23129,11 @@ var VSnackbar = __webpack_require__("ca71");
|
|
|
23129
23129
|
|
|
23130
23130
|
var CAlert_component = normalizeComponent(
|
|
23131
23131
|
components_CAlertvue_type_script_lang_ts_,
|
|
23132
|
-
|
|
23132
|
+
CAlertvue_type_template_id_63c332ca_scoped_true_render,
|
|
23133
23133
|
staticRenderFns,
|
|
23134
23134
|
false,
|
|
23135
23135
|
null,
|
|
23136
|
-
"
|
|
23136
|
+
"63c332ca",
|
|
23137
23137
|
null
|
|
23138
23138
|
|
|
23139
23139
|
)
|