@weni/unnnic-system 1.11.3 → 1.12.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.
- package/dist/scss/colors.scss +11 -0
- package/dist/scss/fonts.scss +43 -1
- package/dist/unnnic.common.js +203 -3
- package/dist/unnnic.common.js.map +1 -1
- package/dist/unnnic.css +1 -1
- package/dist/unnnic.umd.js +203 -3
- package/dist/unnnic.umd.js.map +1 -1
- package/dist/unnnic.umd.min.js +20 -20
- package/dist/unnnic.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/scss/colors.scss +11 -0
- package/src/assets/scss/fonts.scss +43 -1
- package/src/components/InputNext/InputNext.vue +252 -0
- package/src/components/index.js +3 -0
- package/src/stories/Colors.stories.mdx +91 -0
- package/src/stories/Font.stories.mdx +80 -0
- package/src/stories/InputNext.stories.js +109 -0
package/dist/scss/colors.scss
CHANGED
|
@@ -95,3 +95,14 @@ $scheme-colors:
|
|
|
95
95
|
"brand-sec-dark" $unnnic-color-brand-sec-dark,
|
|
96
96
|
"brand-sec-soft" $unnnic-color-brand-sec-soft,
|
|
97
97
|
"brand-sec" $unnnic-color-brand-sec;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@each $name, $color in $scheme-colors {
|
|
101
|
+
.color-#{$name} {
|
|
102
|
+
color: $color;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.bg-#{$name} {
|
|
106
|
+
background-color: $color;
|
|
107
|
+
}
|
|
108
|
+
}
|
package/dist/scss/fonts.scss
CHANGED
|
@@ -31,4 +31,46 @@ $unnnic-font-size-h1: 4.5rem;
|
|
|
31
31
|
$unnnic-line-height-small: 0.25rem;
|
|
32
32
|
$unnnic-line-height-medium: 0.5rem;
|
|
33
33
|
$unnnic-line-height-md: $unnnic-line-height-medium;
|
|
34
|
-
$unnnic-line-height-large: 1rem;
|
|
34
|
+
$unnnic-line-height-large: 1rem;
|
|
35
|
+
|
|
36
|
+
.unnnic-font {
|
|
37
|
+
font-weight: $unnnic-font-weight-regular;
|
|
38
|
+
font-family: $unnnic-font-family-primary;
|
|
39
|
+
|
|
40
|
+
$font-sizes:
|
|
41
|
+
"body-sm" $unnnic-font-size-body-sm,
|
|
42
|
+
"body-md" $unnnic-font-size-body-md,
|
|
43
|
+
"body-gt" $unnnic-font-size-body-gt,
|
|
44
|
+
"body-lg" $unnnic-font-size-body-lg,
|
|
45
|
+
|
|
46
|
+
"title-sm" $unnnic-font-size-title-sm,
|
|
47
|
+
"title-md" $unnnic-font-size-title-md,
|
|
48
|
+
"title-lg" $unnnic-font-size-title-lg,
|
|
49
|
+
|
|
50
|
+
"h4" $unnnic-font-size-h4,
|
|
51
|
+
"h3" $unnnic-font-size-h3,
|
|
52
|
+
"h2" $unnnic-font-size-h2,
|
|
53
|
+
"h1" $unnnic-font-size-h1;
|
|
54
|
+
|
|
55
|
+
$font-weights:
|
|
56
|
+
"black" $unnnic-font-weight-black,
|
|
57
|
+
"bold" $unnnic-font-weight-bold,
|
|
58
|
+
"light" $unnnic-font-weight-light;
|
|
59
|
+
|
|
60
|
+
&.secondary {
|
|
61
|
+
font-family: $unnnic-font-family-secondary;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@each $name, $size in $font-sizes {
|
|
65
|
+
&.#{$name} {
|
|
66
|
+
font-size: $size;
|
|
67
|
+
line-height: $size + $unnnic-line-height-md;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@each $name, $weight in $font-weights {
|
|
72
|
+
&.#{$name} {
|
|
73
|
+
font-weight: $weight;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
package/dist/unnnic.common.js
CHANGED
|
@@ -2806,6 +2806,13 @@ module.exports = function (it) {
|
|
|
2806
2806
|
};
|
|
2807
2807
|
|
|
2808
2808
|
|
|
2809
|
+
/***/ }),
|
|
2810
|
+
|
|
2811
|
+
/***/ "1c68":
|
|
2812
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2813
|
+
|
|
2814
|
+
// extracted by mini-css-extract-plugin
|
|
2815
|
+
|
|
2809
2816
|
/***/ }),
|
|
2810
2817
|
|
|
2811
2818
|
/***/ "1c7e":
|
|
@@ -28494,6 +28501,17 @@ module.exports = function (key, value) {
|
|
|
28494
28501
|
};
|
|
28495
28502
|
|
|
28496
28503
|
|
|
28504
|
+
/***/ }),
|
|
28505
|
+
|
|
28506
|
+
/***/ "ce59":
|
|
28507
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28508
|
+
|
|
28509
|
+
"use strict";
|
|
28510
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_InputNext_vue_vue_type_style_index_0_id_0b424ebe_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1c68");
|
|
28511
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_InputNext_vue_vue_type_style_index_0_id_0b424ebe_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_InputNext_vue_vue_type_style_index_0_id_0b424ebe_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
28512
|
+
/* unused harmony reexport * */
|
|
28513
|
+
|
|
28514
|
+
|
|
28497
28515
|
/***/ }),
|
|
28498
28516
|
|
|
28499
28517
|
/***/ "ce8a":
|
|
@@ -32658,6 +32676,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32658
32676
|
|
|
32659
32677
|
// EXPORTS
|
|
32660
32678
|
__webpack_require__.d(__webpack_exports__, "unnnicInput", function() { return /* reexport */ unnnicInput; });
|
|
32679
|
+
__webpack_require__.d(__webpack_exports__, "unnnicInputNext", function() { return /* reexport */ unnnicInputNext; });
|
|
32661
32680
|
__webpack_require__.d(__webpack_exports__, "unnnicInputDatePicker", function() { return /* reexport */ unnnicInputDatePicker; });
|
|
32662
32681
|
__webpack_require__.d(__webpack_exports__, "unnnicButton", function() { return /* reexport */ unnnicButton; });
|
|
32663
32682
|
__webpack_require__.d(__webpack_exports__, "unnnicButtonIcon", function() { return /* reexport */ unnnicButtonIcon; });
|
|
@@ -34536,6 +34555,187 @@ var Input_component = normalizeComponent(
|
|
|
34536
34555
|
)
|
|
34537
34556
|
|
|
34538
34557
|
/* harmony default export */ var Input = (Input_component.exports);
|
|
34558
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1cea8ebe-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/InputNext/InputNext.vue?vue&type=template&id=0b424ebe&scoped=true&
|
|
34559
|
+
var InputNextvue_type_template_id_0b424ebe_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['unnnic-input', ("size-" + _vm.size), { 'type-error': _vm.hasError }]},[(!!this.$slots.label || _vm.label)?_c('span',{class:[
|
|
34560
|
+
'label unnnic-font secondary color-neutral-cloudy',
|
|
34561
|
+
{ 'body-md': _vm.size === 'sm', 'body-gt': _vm.size == 'md' }
|
|
34562
|
+
],on:{"click":function($event){return _vm.$refs.input.focus()}}},[(!!this.$slots.label)?[_vm._t("label")]:(_vm.label)?[_vm._v(" "+_vm._s(_vm.label)+" ")]:_vm._e()],2):_vm._e(),_c('div',{staticClass:"input-container",on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.$refs.input.focus()}}},[(_vm.iconLeft)?_c('unnnic-icon',{attrs:{"icon":_vm.iconLeft,"size":"sm","scheme":_vm.iconScheme},nativeOn:{"click":function($event){return _vm.$refs.input.focus()}}}):_vm._e(),_c('input',{ref:"input",staticClass:"unnnic-font secondary",attrs:{"type":_vm.allowTogglePassword ? (_vm.showPassword ? 'text' : 'password') : _vm.nativeType,"placeholder":_vm.placeholder,"disabled":_vm.disabled},domProps:{"value":_vm.value},on:{"focus":_vm.focus,"blur":_vm.blur,"input":function($event){return _vm.$emit('input', $event.srcElement.value)}}}),(_vm.iconRight)?_c('unnnic-icon',{attrs:{"icon":_vm.iconRight,"size":"sm","scheme":_vm.iconScheme},nativeOn:{"click":function($event){return _vm.$refs.input.focus()}}}):_vm._e(),(_vm.allowTogglePassword)?_c('unnnic-icon',{attrs:{"icon":_vm.showPassword ? 'view-off-1' : 'view-1-1',"size":"sm","scheme":_vm.iconScheme,"clickable":""},on:{"click":function($event){_vm.showPassword = !_vm.showPassword}}}):_vm._e()],1),(_vm.error && _vm.error !== true)?_c('div',{staticClass:"message unnnic-font secondary body-md color-feedback-red"},[_vm._v(" "+_vm._s(_vm.error)+" ")]):(_vm.message)?_c('div',{staticClass:"message unnnic-font secondary body-md color-neutral-cloudy"},[_vm._v(" "+_vm._s(_vm.message)+" ")]):_vm._e()])}
|
|
34563
|
+
var InputNextvue_type_template_id_0b424ebe_scoped_true_staticRenderFns = []
|
|
34564
|
+
|
|
34565
|
+
|
|
34566
|
+
// CONCATENATED MODULE: ./src/components/InputNext/InputNext.vue?vue&type=template&id=0b424ebe&scoped=true&
|
|
34567
|
+
|
|
34568
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
|
|
34569
|
+
var es_array_includes = __webpack_require__("caad");
|
|
34570
|
+
|
|
34571
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/InputNext/InputNext.vue?vue&type=script&lang=js&
|
|
34572
|
+
|
|
34573
|
+
//
|
|
34574
|
+
//
|
|
34575
|
+
//
|
|
34576
|
+
//
|
|
34577
|
+
//
|
|
34578
|
+
//
|
|
34579
|
+
//
|
|
34580
|
+
//
|
|
34581
|
+
//
|
|
34582
|
+
//
|
|
34583
|
+
//
|
|
34584
|
+
//
|
|
34585
|
+
//
|
|
34586
|
+
//
|
|
34587
|
+
//
|
|
34588
|
+
//
|
|
34589
|
+
//
|
|
34590
|
+
//
|
|
34591
|
+
//
|
|
34592
|
+
//
|
|
34593
|
+
//
|
|
34594
|
+
//
|
|
34595
|
+
//
|
|
34596
|
+
//
|
|
34597
|
+
//
|
|
34598
|
+
//
|
|
34599
|
+
//
|
|
34600
|
+
//
|
|
34601
|
+
//
|
|
34602
|
+
//
|
|
34603
|
+
//
|
|
34604
|
+
//
|
|
34605
|
+
//
|
|
34606
|
+
//
|
|
34607
|
+
//
|
|
34608
|
+
//
|
|
34609
|
+
//
|
|
34610
|
+
//
|
|
34611
|
+
//
|
|
34612
|
+
//
|
|
34613
|
+
//
|
|
34614
|
+
//
|
|
34615
|
+
//
|
|
34616
|
+
//
|
|
34617
|
+
//
|
|
34618
|
+
//
|
|
34619
|
+
//
|
|
34620
|
+
//
|
|
34621
|
+
//
|
|
34622
|
+
//
|
|
34623
|
+
//
|
|
34624
|
+
//
|
|
34625
|
+
//
|
|
34626
|
+
//
|
|
34627
|
+
//
|
|
34628
|
+
//
|
|
34629
|
+
//
|
|
34630
|
+
//
|
|
34631
|
+
//
|
|
34632
|
+
//
|
|
34633
|
+
//
|
|
34634
|
+
//
|
|
34635
|
+
//
|
|
34636
|
+
//
|
|
34637
|
+
//
|
|
34638
|
+
//
|
|
34639
|
+
//
|
|
34640
|
+
//
|
|
34641
|
+
//
|
|
34642
|
+
//
|
|
34643
|
+
//
|
|
34644
|
+
//
|
|
34645
|
+
//
|
|
34646
|
+
//
|
|
34647
|
+
|
|
34648
|
+
/* harmony default export */ var InputNextvue_type_script_lang_js_ = ({
|
|
34649
|
+
components: {
|
|
34650
|
+
UnnnicIcon: Icon
|
|
34651
|
+
},
|
|
34652
|
+
props: {
|
|
34653
|
+
value: String,
|
|
34654
|
+
label: String,
|
|
34655
|
+
iconLeft: String,
|
|
34656
|
+
iconRight: String,
|
|
34657
|
+
allowTogglePassword: Boolean,
|
|
34658
|
+
disabled: Boolean,
|
|
34659
|
+
size: {
|
|
34660
|
+
type: String,
|
|
34661
|
+
default: 'md',
|
|
34662
|
+
validator: function validator(size) {
|
|
34663
|
+
return ['md', 'sm'].includes(size);
|
|
34664
|
+
}
|
|
34665
|
+
},
|
|
34666
|
+
type: {
|
|
34667
|
+
type: String,
|
|
34668
|
+
default: 'normal',
|
|
34669
|
+
validator: function validator(type) {
|
|
34670
|
+
return ['normal', 'error'].includes(type);
|
|
34671
|
+
}
|
|
34672
|
+
},
|
|
34673
|
+
nativeType: {
|
|
34674
|
+
type: String,
|
|
34675
|
+
default: 'text',
|
|
34676
|
+
validator: function validator(type) {
|
|
34677
|
+
return ['text', 'password'].includes(type);
|
|
34678
|
+
}
|
|
34679
|
+
},
|
|
34680
|
+
placeholder: String,
|
|
34681
|
+
message: String,
|
|
34682
|
+
error: {
|
|
34683
|
+
type: [Boolean, String]
|
|
34684
|
+
}
|
|
34685
|
+
},
|
|
34686
|
+
data: function data() {
|
|
34687
|
+
return {
|
|
34688
|
+
isFocused: false,
|
|
34689
|
+
showPassword: false
|
|
34690
|
+
};
|
|
34691
|
+
},
|
|
34692
|
+
computed: {
|
|
34693
|
+
hasError: function hasError() {
|
|
34694
|
+
return this.error === true || this.error || this.type === 'error';
|
|
34695
|
+
},
|
|
34696
|
+
iconScheme: function iconScheme() {
|
|
34697
|
+
if (this.hasError) {
|
|
34698
|
+
return 'feedback-red';
|
|
34699
|
+
}
|
|
34700
|
+
|
|
34701
|
+
return this.isFocused ? 'neutral-dark' : 'neutral-cloudy';
|
|
34702
|
+
}
|
|
34703
|
+
},
|
|
34704
|
+
methods: {
|
|
34705
|
+
focus: function focus() {
|
|
34706
|
+
this.isFocused = true;
|
|
34707
|
+
},
|
|
34708
|
+
blur: function blur() {
|
|
34709
|
+
this.isFocused = false;
|
|
34710
|
+
}
|
|
34711
|
+
}
|
|
34712
|
+
});
|
|
34713
|
+
// CONCATENATED MODULE: ./src/components/InputNext/InputNext.vue?vue&type=script&lang=js&
|
|
34714
|
+
/* harmony default export */ var InputNext_InputNextvue_type_script_lang_js_ = (InputNextvue_type_script_lang_js_);
|
|
34715
|
+
// EXTERNAL MODULE: ./src/components/InputNext/InputNext.vue?vue&type=style&index=0&id=0b424ebe&lang=scss&scoped=true&
|
|
34716
|
+
var InputNextvue_type_style_index_0_id_0b424ebe_lang_scss_scoped_true_ = __webpack_require__("ce59");
|
|
34717
|
+
|
|
34718
|
+
// CONCATENATED MODULE: ./src/components/InputNext/InputNext.vue
|
|
34719
|
+
|
|
34720
|
+
|
|
34721
|
+
|
|
34722
|
+
|
|
34723
|
+
|
|
34724
|
+
|
|
34725
|
+
/* normalize component */
|
|
34726
|
+
|
|
34727
|
+
var InputNext_component = normalizeComponent(
|
|
34728
|
+
InputNext_InputNextvue_type_script_lang_js_,
|
|
34729
|
+
InputNextvue_type_template_id_0b424ebe_scoped_true_render,
|
|
34730
|
+
InputNextvue_type_template_id_0b424ebe_scoped_true_staticRenderFns,
|
|
34731
|
+
false,
|
|
34732
|
+
null,
|
|
34733
|
+
"0b424ebe",
|
|
34734
|
+
null
|
|
34735
|
+
|
|
34736
|
+
)
|
|
34737
|
+
|
|
34738
|
+
/* harmony default export */ var InputNext = (InputNext_component.exports);
|
|
34539
34739
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1cea8ebe-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/InputDatePicker/InputDatePicker.vue?vue&type=template&id=741dbc51&scoped=true&
|
|
34540
34740
|
var InputDatePickervue_type_template_id_741dbc51_scoped_true_render = function () {
|
|
34541
34741
|
var _obj;
|
|
@@ -34545,9 +34745,6 @@ var InputDatePickervue_type_template_id_741dbc51_scoped_true_staticRenderFns = [
|
|
|
34545
34745
|
|
|
34546
34746
|
// CONCATENATED MODULE: ./src/components/InputDatePicker/InputDatePicker.vue?vue&type=template&id=741dbc51&scoped=true&
|
|
34547
34747
|
|
|
34548
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
|
|
34549
|
-
var es_array_includes = __webpack_require__("caad");
|
|
34550
|
-
|
|
34551
34748
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
|
|
34552
34749
|
var es_array_join = __webpack_require__("a15b");
|
|
34553
34750
|
|
|
@@ -46009,10 +46206,12 @@ var ProgressBar_component = normalizeComponent(
|
|
|
46009
46206
|
|
|
46010
46207
|
|
|
46011
46208
|
|
|
46209
|
+
|
|
46012
46210
|
|
|
46013
46211
|
|
|
46014
46212
|
var components = {
|
|
46015
46213
|
unnnicInput: Input,
|
|
46214
|
+
unnnicInputNext: InputNext,
|
|
46016
46215
|
unnnicInputDatePicker: InputDatePicker,
|
|
46017
46216
|
unnnicButton: Button,
|
|
46018
46217
|
unnnicButtonIcon: ButtonIcon,
|
|
@@ -46079,6 +46278,7 @@ Object.keys(components).forEach(function (name) {
|
|
|
46079
46278
|
external_commonjs_vue_commonjs2_vue_root_Vue_default.a.component(name, components[name]);
|
|
46080
46279
|
});
|
|
46081
46280
|
var unnnicInput = Input;
|
|
46281
|
+
var unnnicInputNext = InputNext;
|
|
46082
46282
|
var unnnicInputDatePicker = InputDatePicker;
|
|
46083
46283
|
var unnnicButton = Button;
|
|
46084
46284
|
var unnnicButtonIcon = ButtonIcon;
|