@vcita/design-system 0.2.2 → 0.2.3
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/@vcita/design-system.esm.js +58 -82
- package/dist/@vcita/design-system.min.js +1 -1
- package/dist/@vcita/design-system.ssr.js +61 -84
- package/init/DesignSystem.js +5 -1
- package/package.json +1 -1
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/components/VcButton/VcButton.stories.mdx.old +40 -0
- package/src/components/VcExpansionPanels/VcExpansionPanels.stories.js +36 -0
- package/src/components/VcExpansionPanels/VcExpansionPanels.vue +26 -0
- package/src/components/VcHourInput/VcHourInput.stories.js +36 -0
- package/src/components/VcHourInput/VcHourInput.vue +134 -0
- package/src/components/VcTextField/VcTextField.spec.js +13 -95
- package/src/components/VcTextField/VcTextField.stories.js +60 -41
- package/src/components/VcTextField/VcTextField.vue +78 -155
- package/src/components/Wizard/VcMobileWizardProgress/VcMobileWizardProgress.vue +2 -2
- package/src/components/Wizard/VcSteperContant/VcStepperContent.spec.js +163 -0
- package/src/components/Wizard/VcSteperContant/VcStepperContent.stories.js +118 -0
- package/src/components/Wizard/VcSteperContant/VcStepperContent.vue +153 -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/plugin.svg +1 -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/CHANGELOG.MD +0 -51
- package/src/.DS_Store +0 -0
|
@@ -2975,14 +2975,18 @@ var __vue_component__$f = /*#__PURE__*/normalizeComponent({
|
|
|
2975
2975
|
}
|
|
2976
2976
|
},
|
|
2977
2977
|
currentStepName: function currentStepName() {
|
|
2978
|
-
|
|
2978
|
+
var _this$steps;
|
|
2979
|
+
|
|
2980
|
+
return (_this$steps = this.steps[this.currentStep - 1]) === null || _this$steps === void 0 ? void 0 : _this$steps.name;
|
|
2979
2981
|
},
|
|
2980
2982
|
nextStepName: function nextStepName() {
|
|
2983
|
+
var _this$steps$this$curr;
|
|
2984
|
+
|
|
2981
2985
|
if (this.currentStep >= this.numOfSteps) {
|
|
2982
2986
|
return;
|
|
2983
2987
|
}
|
|
2984
2988
|
|
|
2985
|
-
return "".concat(this.$dst("ds.progress_circular.next"), " ").concat(this.steps[this.currentStep]
|
|
2989
|
+
return "".concat(this.$dst("ds.progress_circular.next"), " ").concat((_this$steps$this$curr = this.steps[this.currentStep]) === null || _this$steps$this$curr === void 0 ? void 0 : _this$steps$this$curr.name);
|
|
2986
2990
|
},
|
|
2987
2991
|
numOfSteps: function numOfSteps() {
|
|
2988
2992
|
return this.steps.length;
|
|
@@ -3033,8 +3037,8 @@ var __vue_staticRenderFns__$e = [];
|
|
|
3033
3037
|
|
|
3034
3038
|
var __vue_inject_styles__$e = function __vue_inject_styles__(inject) {
|
|
3035
3039
|
if (!inject) return;
|
|
3036
|
-
inject("data-v-
|
|
3037
|
-
source: "[data-v-
|
|
3040
|
+
inject("data-v-47502eba_0", {
|
|
3041
|
+
source: "[data-v-47502eba]:root{--primary-font-family:Montserrat;--font-size-xxx-small:9px;--font-size-xx-small:12px;--font-size-x-small:13px;--font-size-small:14px;--font-size-small2:15px;--font-size-medium:18px;--font-size-medium1:22px;--font-size-medium2:24px;--font-size-large:28px;--font-weight-medium:400;--font-weight-medium2:500;--font-weight-large:600;--font-weight-large2:700;--font-weight-xl:800;--size-value0:0px;--size-value1:4px;--size-value2:8px;--size-value3:12px;--size-value4:16px;--size-value5:20px;--size-value6:24px;--size-value7:28px;--size-value8:32px;--size-value9:36px;--size-value10:40px;--size-value11:44px;--size-value12:48px;--size-value13:52px;--size-value14:56px;--size-value15:60px;--size-value16:64px;--size-value17:68px;--size-value18:72px;--size-value19:76px;--size-value20:80px;--border-radius:6px;--modal-desktop-offset:-112px;--modal-bg-color:#ffffff;--modal-box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),2px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px rgba(0, 0, 0, 0.12);--modal-border-radius:10px;--modal-width-small:384px;--modal-width-medium:576px;--modal-width-large:816px;--avatar-x-sm:24px;--avatar-sm:32px;--avatar-md:40px;--avatar-lg:48px;--gray-darken-5:#212121;--gray-darken-4:#616161;--gray-darken-3:#757575;--gray-darken-2:#999999;--gray-darken-1:#b3b3b3;--gray:#cccccc;--gray-lighten-1:#e0e0e0;--gray-lighten-2:#ededed;--gray-lighten-3:#f7f7f7;--gray-lighten-4:#fafafa;--neutral:#586E8C;--neutral-lighten-1:#D6DBE6;--neutral-lighten-2:#EAEDF2;--neutral-lighten-3:#F8F9FB;--red:#F2514A;--red-lighten-1:#F79792;--red-lighten-2:#FBCBC9;--red-lighten-3:#FDE8E7;--yellow:#FFC511;--yellow-lighten-1:#FFDC70;--yellow-lighten-2:#FFEDB8;--yellow-lighten-3:#FFF7E0;--green:#54D28C;--green-lighten-1:#98E4BA;--green-lighten-2:#CFF8E1;--green-lighten-3:#EAFCF2;--blue:#478FFF;--blue-lighten-1:#91BCFF;--blue-lighten-2:#C8DDFF;--blue-lighten-3:#E7F0FF;--orange:#FF8F00;--orange-lighten-1:#FCB965;--orange-lighten-2:#FAD9B0;--orange-lighten-3:#F9EBDA;--shadow-1:0px 1px 4px rgba(0, 0, 0, 0.11);--shadow-2:0px 2px 5px rgba(0, 0, 0, 0.1),0px 2px 2px rgba(0, 0, 0, 0.06),0px 3px 1px -2px rgba(0, 0, 0, 0.06);--shadow-3:0px 3px 2px rgba(0, 0, 0, 0.101961);--shadow-4:0px 1px 1px rgba(0, 0, 0, 0.06),0px 3px 8px rgba(0, 0, 0, 0.15);--shadow-5:0px 4px 18px rgba(0, 0, 0, 0.1);--shadow-6:0px 1px 10px rgba(0, 0, 0, 0.12),0px 4px 7px rgba(0, 0, 0, 0.14),0px 2px 4px -1px rgba(0, 0, 0, 0.2);--shadow-7:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px rgba(0, 0, 0, 0.14),0px 1px 18px rgba(0, 0, 0, 0.12);--shadow-8:0px 5px 7px 3px rgba(0, 0, 0, 0.26);--shadow-9:0px 7px 8px -4px rgba(0, 0, 0, 0.2),2px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px rgba(0, 0, 0, 0.12)}.vc-mobile-wizard-progress .titles-container[data-v-47502eba]{margin:var(--size-value0) var(--size-value4)}.vc-mobile-wizard-progress .titles-container .current-step[data-v-47502eba]{font-weight:var(--font-weight-large2);font-size:var(--font-size-small2)}.vc-mobile-wizard-progress .titles-container .next-step[data-v-47502eba]{font-size:var(--font-size-x-small);color:var(--gray-darken-4)}",
|
|
3038
3042
|
map: undefined,
|
|
3039
3043
|
media: undefined
|
|
3040
3044
|
});
|
|
@@ -3042,10 +3046,10 @@ var __vue_inject_styles__$e = function __vue_inject_styles__(inject) {
|
|
|
3042
3046
|
/* scoped */
|
|
3043
3047
|
|
|
3044
3048
|
|
|
3045
|
-
var __vue_scope_id__$e = "data-v-
|
|
3049
|
+
var __vue_scope_id__$e = "data-v-47502eba";
|
|
3046
3050
|
/* module identifier */
|
|
3047
3051
|
|
|
3048
|
-
var __vue_module_identifier__$e = "data-v-
|
|
3052
|
+
var __vue_module_identifier__$e = "data-v-47502eba";
|
|
3049
3053
|
/* functional template */
|
|
3050
3054
|
|
|
3051
3055
|
var __vue_is_functional_template__$e = false;
|
|
@@ -3427,14 +3431,32 @@ var __vue_is_functional_template__$b = false;
|
|
|
3427
3431
|
var __vue_component__$b = /*#__PURE__*/normalizeComponent({
|
|
3428
3432
|
render: __vue_render__$b,
|
|
3429
3433
|
staticRenderFns: __vue_staticRenderFns__$b
|
|
3430
|
-
}, __vue_inject_styles__$b, __vue_script__$b, __vue_scope_id__$b, __vue_is_functional_template__$b, __vue_module_identifier__$b, false, undefined, createInjectorSSR, undefined)
|
|
3431
|
-
|
|
3434
|
+
}, __vue_inject_styles__$b, __vue_script__$b, __vue_scope_id__$b, __vue_is_functional_template__$b, __vue_module_identifier__$b, false, undefined, createInjectorSSR, undefined);//
|
|
3435
|
+
//
|
|
3436
|
+
//
|
|
3437
|
+
//
|
|
3438
|
+
//
|
|
3439
|
+
//
|
|
3440
|
+
//
|
|
3441
|
+
//
|
|
3442
|
+
//
|
|
3443
|
+
//
|
|
3444
|
+
//
|
|
3445
|
+
//
|
|
3446
|
+
//
|
|
3447
|
+
//
|
|
3448
|
+
//
|
|
3449
|
+
//
|
|
3450
|
+
//
|
|
3451
|
+
//
|
|
3452
|
+
//
|
|
3453
|
+
var script$a = {
|
|
3432
3454
|
components: {
|
|
3433
|
-
VcLayout: __vue_component__$u,
|
|
3434
|
-
VcButton: __vue_component__$w,
|
|
3435
|
-
VcIcon: __vue_component__$x,
|
|
3436
3455
|
VTextField: lib.VTextField
|
|
3437
3456
|
},
|
|
3457
|
+
|
|
3458
|
+
name: 'VcTextField',
|
|
3459
|
+
|
|
3438
3460
|
props: {
|
|
3439
3461
|
type: {
|
|
3440
3462
|
type: String,
|
|
@@ -3443,44 +3465,36 @@ var __vue_component__$b = /*#__PURE__*/normalizeComponent({
|
|
|
3443
3465
|
return ['text', 'number'].includes(prop);
|
|
3444
3466
|
}
|
|
3445
3467
|
},
|
|
3446
|
-
|
|
3468
|
+
dataQa: {
|
|
3447
3469
|
type: String,
|
|
3448
|
-
default: ''
|
|
3470
|
+
default: 'vc-text-field'
|
|
3449
3471
|
},
|
|
3450
|
-
|
|
3472
|
+
label: {
|
|
3451
3473
|
type: String,
|
|
3452
|
-
default: '
|
|
3474
|
+
default: ''
|
|
3453
3475
|
},
|
|
3454
3476
|
value: {
|
|
3455
3477
|
type: [Number, String],
|
|
3456
3478
|
default: ''
|
|
3457
3479
|
},
|
|
3458
|
-
|
|
3459
|
-
type: Number,
|
|
3460
|
-
default:
|
|
3480
|
+
counter: {
|
|
3481
|
+
type: [Number, Boolean],
|
|
3482
|
+
default: false
|
|
3461
3483
|
},
|
|
3462
|
-
|
|
3484
|
+
maxlength: {
|
|
3463
3485
|
type: Number,
|
|
3464
|
-
default:
|
|
3486
|
+
default: 100
|
|
3465
3487
|
},
|
|
3466
3488
|
rules: {
|
|
3467
3489
|
type: Array
|
|
3468
3490
|
},
|
|
3469
|
-
|
|
3491
|
+
disabled: {
|
|
3492
|
+
type: Boolean,
|
|
3493
|
+
default: false
|
|
3494
|
+
},
|
|
3495
|
+
hint: {
|
|
3470
3496
|
type: String,
|
|
3471
|
-
default: '
|
|
3472
|
-
}
|
|
3473
|
-
},
|
|
3474
|
-
methods: {
|
|
3475
|
-
updateValue: function updateValue(num) {
|
|
3476
|
-
var currVal = parseFloat(this.value);
|
|
3477
|
-
currVal = parseFloat((currVal + num).toPrecision(this.step.length + 1));
|
|
3478
|
-
|
|
3479
|
-
if (currVal < parseFloat(this.min) || currVal > parseFloat(this.max)) {
|
|
3480
|
-
return;
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
this.$emit('input', currVal.toString());
|
|
3497
|
+
default: ''
|
|
3484
3498
|
}
|
|
3485
3499
|
}
|
|
3486
3500
|
};/* script */
|
|
@@ -3498,58 +3512,25 @@ var __vue_render__$a = function __vue_render__() {
|
|
|
3498
3512
|
staticClass: "VcTextInput",
|
|
3499
3513
|
attrs: {
|
|
3500
3514
|
"dense": "",
|
|
3515
|
+
"data-qa": _vm.dataQa,
|
|
3501
3516
|
"label": _vm.label,
|
|
3502
3517
|
"rules": _vm.rules,
|
|
3518
|
+
"disabled": _vm.disabled,
|
|
3503
3519
|
"type": _vm.type,
|
|
3520
|
+
"error": _vm.counter && _vm.maxlength && _vm.value.length > _vm.maxlength,
|
|
3504
3521
|
"value": _vm.value,
|
|
3505
|
-
"
|
|
3506
|
-
"
|
|
3522
|
+
"hint": _vm.hint,
|
|
3523
|
+
"counter": _vm.counter,
|
|
3524
|
+
"maxlength": _vm.maxlength,
|
|
3525
|
+
"persistent-hint": "",
|
|
3507
3526
|
"hide-details": "auto"
|
|
3508
3527
|
},
|
|
3509
3528
|
on: {
|
|
3510
3529
|
"input": function input(data) {
|
|
3511
3530
|
return _vm.$emit('input', data);
|
|
3512
3531
|
}
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
key: "append",
|
|
3516
|
-
fn: function fn() {
|
|
3517
|
-
return [_c('VcLayout', {
|
|
3518
|
-
staticClass: "number-counter",
|
|
3519
|
-
attrs: {
|
|
3520
|
-
"column": ""
|
|
3521
|
-
}
|
|
3522
|
-
}, [_c('VcButton', {
|
|
3523
|
-
attrs: {
|
|
3524
|
-
"icon": "",
|
|
3525
|
-
"data-qa": "VcTextFieldButtonUp",
|
|
3526
|
-
"ripple": false,
|
|
3527
|
-
"min-width": "44px",
|
|
3528
|
-
"max-height": "25px"
|
|
3529
|
-
},
|
|
3530
|
-
on: {
|
|
3531
|
-
"click": function click($event) {
|
|
3532
|
-
_vm.updateValue(parseFloat(_vm.step));
|
|
3533
|
-
}
|
|
3534
|
-
}
|
|
3535
|
-
}, [_c('VcIcon', [_vm._v("icon-caret-down fa-rotate-180")])], 1), _vm._v(" "), _c('VcButton', {
|
|
3536
|
-
attrs: {
|
|
3537
|
-
"icon": "",
|
|
3538
|
-
"data-qa": "VcTextFieldButtonDown",
|
|
3539
|
-
"ripple": false,
|
|
3540
|
-
"min-width": "44px",
|
|
3541
|
-
"max-height": "25px"
|
|
3542
|
-
},
|
|
3543
|
-
on: {
|
|
3544
|
-
"click": function click($event) {
|
|
3545
|
-
_vm.updateValue(-parseFloat(_vm.step));
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
}, [_c('VcIcon', [_vm._v("icon-caret-down")])], 1)], 1)];
|
|
3549
|
-
},
|
|
3550
|
-
proxy: true
|
|
3551
|
-
} : null], null, true)
|
|
3552
|
-
}, [_vm._v(" "), _vm._t("default")], 2);
|
|
3532
|
+
}
|
|
3533
|
+
});
|
|
3553
3534
|
};
|
|
3554
3535
|
|
|
3555
3536
|
var __vue_staticRenderFns__$a = [];
|
|
@@ -3557,12 +3538,8 @@ var __vue_staticRenderFns__$a = [];
|
|
|
3557
3538
|
|
|
3558
3539
|
var __vue_inject_styles__$a = function __vue_inject_styles__(inject) {
|
|
3559
3540
|
if (!inject) return;
|
|
3560
|
-
inject("data-v-
|
|
3561
|
-
source: ".
|
|
3562
|
-
map: undefined,
|
|
3563
|
-
media: undefined
|
|
3564
|
-
}), inject("data-v-31ca7c6a_1", {
|
|
3565
|
-
source: ".VcTextInput.v-text-field{margin:0;padding:0}.VcTextInput.v-text-field label{letter-spacing:-.3px;font-size:15px;color:rgba(0,0,0,.4)}.VcTextInput.v-text-field .v-text-field__slot:first-child{margin:0 12px}.VcTextInput.v-text-field[prepend-inner-icon] .v-text-field__slot{padding:0}.VcTextInput.v-text-field.v-input--is-focused label,.VcTextInput.v-text-field.v-input--is-label-active label{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.17;letter-spacing:-.3px;color:rgba(0,0,0,.62)!important;transform:translateY(-100%) scale(.85);top:8px}.VcTextInput.v-text-field:not(.v-text-field--outlined) .v-text-field__slot{transition:margin-bottom .1s}.VcTextInput.v-text-field:not(.v-text-field--outlined).v-input--is-focused .v-text-field__slot,.VcTextInput.v-text-field:not(.v-text-field--outlined).v-input--is-label-active .v-text-field__slot{margin-bottom:-20px}.VcTextInput.v-text-field.v-input--is-focused .v-input__slot{border-color:currentColor}.VcTextInput.v-text-field .v-input__slot{min-height:52px!important;border-radius:6px;background-color:#fff!important;position:relative!important;border:solid 1px rgba(0,0,0,.12);transition:border-color,background-color .1s!important}.VcTextInput.v-text-field .v-input__slot:hover{border-color:currentColor}.VcTextInput.v-text-field .v-input__slot:after,.VcTextInput.v-text-field .v-input__slot:before{display:none}.VcTextInput.v-text-field.v-input--is-disabled .v-input__slot{background-color:rgba(0,0,0,.03)!important}.VcTextInput.v-text-field input{font-size:15px!important;font-weight:500}.VcTextInput.v-text-field .v-text-field__prefix{color:rgba(0,0,0,.54)!important}.VcTextInput.v-text-field .v-input__append-inner,.VcTextInput.v-text-field .v-input__prepend-inner{color:rgba(0,0,0,.4);margin:auto 12px auto 12px!important;max-width:20px;max-height:20px;padding:0!important}.VcTextInput.v-text-field .v-input__append-inner .v-input__icon,.VcTextInput.v-text-field .v-input__prepend-inner .v-input__icon{height:100%;max-width:100%;min-width:100%;max-height:100%;min-height:100%}.VcTextInput.v-text-field .v-input__append-inner i,.VcTextInput.v-text-field .v-input__prepend-inner i{color:rgba(0,0,0,.4)}.VcTextInput.v-text-field.error--text .v-input__slot{border:1px solid #f2514a}",
|
|
3541
|
+
inject("data-v-027a8ee5_0", {
|
|
3542
|
+
source: ".VcTextInput.v-text-field[data-v-027a8ee5]{font-family:var(--primary-font-family)}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot{padding:0 var(--size-value3);height:var(--size-value13);background:#fff;border:1px solid var(--gray-lighten-1);box-sizing:border-box;border-radius:6px}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot label{font-size:var(--font-size-small2);line-height:var(--size-value5);color:var(--gray-darken-3);font-weight:var(--font-weight-medium)}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot input{font-weight:var(--font-weight-medium2);font-size:var(--font-size-small2);line-height:var(--size-value5);color:var(--gray-darken-5)}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:after,.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:before{display:none}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:hover{border-color:var(--gray-darken-3)}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:active,.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:focus,.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:focus-within{border:1px solid var(--v-secondary-base);box-shadow:0 0 0 3px var(--v-secondary-lighten1)}.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:active input,.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:focus input,.VcTextInput.v-text-field[data-v-027a8ee5] .v-input__slot:focus-within input{color:var(--gray-darken-3)}.VcTextInput.v-text-field[data-v-027a8ee5].error--text .v-input__slot{border-color:var(--red);color:unset;box-shadow:unset;font-size:var(--font-size-xx-small);line-height:var(--size-value4)}.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-focused label,.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-label-active label{font-size:var(--font-size-small);line-height:1.17;letter-spacing:-.3px;color:var(--gray-darken-4)!important;transform:translateY(-100%) scale(.85);top:var(--size-value2)}.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-focused .v-text-field__slot,.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-label-active .v-text-field__slot{margin-bottom:-14px}.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-disabled .v-input__slot{background:var(--gray-lighten-3);border:1px solid var(--gray-lighten-1)}.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-disabled .v-input__slot input,.VcTextInput.v-text-field[data-v-027a8ee5].v-input--is-disabled .v-input__slot label{color:var(--gray-darken-2)}.VcTextInput.v-text-field[data-v-027a8ee5]:not(.v-input--is-label-active):not(.v-input--is-focused) input{padding:var(--size-value2) 0}.VcTextInput.v-text-field[data-v-027a8ee5] .v-messages__message{line-height:var(--size-value4)}",
|
|
3566
3543
|
map: undefined,
|
|
3567
3544
|
media: undefined
|
|
3568
3545
|
});
|
|
@@ -3570,10 +3547,10 @@ var __vue_inject_styles__$a = function __vue_inject_styles__(inject) {
|
|
|
3570
3547
|
/* scoped */
|
|
3571
3548
|
|
|
3572
3549
|
|
|
3573
|
-
var __vue_scope_id__$a = "data-v-
|
|
3550
|
+
var __vue_scope_id__$a = "data-v-027a8ee5";
|
|
3574
3551
|
/* module identifier */
|
|
3575
3552
|
|
|
3576
|
-
var __vue_module_identifier__$a = "data-v-
|
|
3553
|
+
var __vue_module_identifier__$a = "data-v-027a8ee5";
|
|
3577
3554
|
/* functional template */
|
|
3578
3555
|
|
|
3579
3556
|
var __vue_is_functional_template__$a = false;
|
package/init/DesignSystem.js
CHANGED
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
VRow,
|
|
27
27
|
VSnackbar,
|
|
28
28
|
VStepper,
|
|
29
|
+
VStepperContent,
|
|
30
|
+
VStepperItems,
|
|
29
31
|
VStepperStep,
|
|
30
32
|
VSwitch,
|
|
31
33
|
VSubheader,
|
|
@@ -61,6 +63,8 @@ Vue.use(Vuetify, {
|
|
|
61
63
|
VProgressCircular,
|
|
62
64
|
VRow,
|
|
63
65
|
VStepper,
|
|
66
|
+
VStepperContent,
|
|
67
|
+
VStepperItems,
|
|
64
68
|
VStepperStep,
|
|
65
69
|
VSnackbar,
|
|
66
70
|
VSubheader,
|
|
@@ -72,7 +76,7 @@ Vue.use(Vuetify, {
|
|
|
72
76
|
});
|
|
73
77
|
|
|
74
78
|
const DesignSystem = ({theme = {}, options = {}} = {}, locale ='en') => {
|
|
75
|
-
const ds = {...options};
|
|
79
|
+
const ds = { ...(Vue.prototype.$ds || {}), ...options};
|
|
76
80
|
// Make the options available to all the components
|
|
77
81
|
Vue.prototype.$ds = ds;
|
|
78
82
|
Vue.prototype.$log = Vue.prototype.$log || console.log;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 87.5 100"><defs><style>.cls-1{fill:#1697f6;}.cls-2{fill:#7bc6ff;}.cls-3{fill:#1867c0;}.cls-4{fill:#aeddff;}</style></defs><title>Artboard 46</title><polyline class="cls-1" points="43.75 0 23.31 0 43.75 48.32"/><polygon class="cls-2" points="43.75 62.5 43.75 100 0 14.58 22.92 14.58 43.75 62.5"/><polyline class="cls-3" points="43.75 0 64.19 0 43.75 48.32"/><polygon class="cls-4" points="64.58 14.58 87.5 14.58 43.75 100 43.75 62.5 64.58 14.58"/></svg>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Meta, Preview, Story, ArgsTable } from '@storybook/addon-docs';
|
|
2
|
+
import VcButton from './VcButton';
|
|
3
|
+
|
|
4
|
+
<Meta title="Buttons / VcButton" component={VcButton} argTypes={{
|
|
5
|
+
color: {
|
|
6
|
+
options: ["primary", "secondary"],
|
|
7
|
+
control: {type: "radio"}
|
|
8
|
+
}
|
|
9
|
+
}}
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<style>{`
|
|
13
|
+
.subheading {
|
|
14
|
+
--mediumdark: '#999999';
|
|
15
|
+
font-weight: 900;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
color: #999;
|
|
18
|
+
letter-spacing: 3px;
|
|
19
|
+
line-height: 24px;
|
|
20
|
+
margin-bottom: 12px;
|
|
21
|
+
margin-top: 40px;
|
|
22
|
+
}
|
|
23
|
+
`}</style>
|
|
24
|
+
|
|
25
|
+
# VcButton Docs
|
|
26
|
+
|
|
27
|
+
Some MDX docs for the `VcButton` component.
|
|
28
|
+
|
|
29
|
+
<Preview>
|
|
30
|
+
<Story name="MDX experiment">
|
|
31
|
+
{{
|
|
32
|
+
components: {VcButton},
|
|
33
|
+
template: `<VcButton label="mdx story button" />`,
|
|
34
|
+
}}
|
|
35
|
+
</Story>
|
|
36
|
+
</Preview>
|
|
37
|
+
|
|
38
|
+
<ArgsTable of={VcButton} />
|
|
39
|
+
|
|
40
|
+
<div className="subheading">CSS Variables</div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import VcExpansionPanelsCmp from './VcExpansionPanels';
|
|
2
|
+
|
|
3
|
+
const Template = (args, {argTypes}) => ({
|
|
4
|
+
components: {VcExpansionPanels: VcExpansionPanelsCmp},
|
|
5
|
+
props: Object.keys(argTypes),
|
|
6
|
+
template: `<div><VcExpansionPanels :param="param"/></div>`,
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export const Playground = Template.bind({});
|
|
10
|
+
|
|
11
|
+
// Set default values
|
|
12
|
+
Playground.args = {
|
|
13
|
+
param: 'value',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'VcExpansionPanels', // This will control the story sidebar position
|
|
18
|
+
id: 'VcExpansionPanels', // This will be the link to this component
|
|
19
|
+
component: VcExpansionPanelsCmp,
|
|
20
|
+
argTypes: {
|
|
21
|
+
param: {
|
|
22
|
+
options: ['value1', 'value2'],
|
|
23
|
+
control: {type: 'radio'}
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
parameters: {
|
|
27
|
+
design: {
|
|
28
|
+
type: 'figma',
|
|
29
|
+
url: 'https://www.figma.com',
|
|
30
|
+
},
|
|
31
|
+
status: {
|
|
32
|
+
type: 'beta', // 'beta' | 'stable' | 'deprecated' | 'releaseCandidate'
|
|
33
|
+
url: 'http://www.url.com/status', // will make the tag a link
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-expansion-panels>
|
|
3
|
+
<v-expansion-panel
|
|
4
|
+
v-for="(item,i) in 5"
|
|
5
|
+
:key="i"
|
|
6
|
+
>
|
|
7
|
+
<v-expansion-panel-header>
|
|
8
|
+
Item
|
|
9
|
+
</v-expansion-panel-header>
|
|
10
|
+
<v-expansion-panel-content>
|
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
12
|
+
</v-expansion-panel-content>
|
|
13
|
+
</v-expansion-panel>
|
|
14
|
+
</v-expansion-panels>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: "VcExpansionPanels",
|
|
20
|
+
props: {},
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss" scoped>
|
|
25
|
+
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// import VcHourInputCmp from './VcHourInput';
|
|
2
|
+
//
|
|
3
|
+
// const Template = (args, {argTypes}) => ({
|
|
4
|
+
// components: {VcHourInput: VcHourInputCmp},
|
|
5
|
+
// props: Object.keys(argTypes),
|
|
6
|
+
// template: '<div><VcHourInput :param="param" @onClick="onClick"/></div>',
|
|
7
|
+
// })
|
|
8
|
+
//
|
|
9
|
+
// // export const Playground = Template.bind({});
|
|
10
|
+
// //
|
|
11
|
+
// // // Set default values
|
|
12
|
+
// // Playground.args = {
|
|
13
|
+
// // param: 'value',
|
|
14
|
+
// // }
|
|
15
|
+
//
|
|
16
|
+
// // export default {
|
|
17
|
+
// // title: 'VcHourInput',
|
|
18
|
+
// // id: 'VcHourInput',
|
|
19
|
+
// // component: VcHourInputCmp,
|
|
20
|
+
// // argTypes: {
|
|
21
|
+
// // param: {
|
|
22
|
+
// // options: ['value1', 'value2'],
|
|
23
|
+
// // control: {type: 'radio'}
|
|
24
|
+
// // },
|
|
25
|
+
// // },
|
|
26
|
+
// // parameters: {
|
|
27
|
+
// // design: {
|
|
28
|
+
// // type: 'figma',
|
|
29
|
+
// // url: 'https://www.figma.com',
|
|
30
|
+
// // },
|
|
31
|
+
// // status: {
|
|
32
|
+
// // type: 'beta', // 'beta' | 'stable' | 'deprecated' | 'releaseCandidate'
|
|
33
|
+
// // url: 'http://www.url.com/status', // will make the tag a link
|
|
34
|
+
// // },
|
|
35
|
+
// // },
|
|
36
|
+
// // };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TextInputWithSelect
|
|
3
|
+
:items="selectItems"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
v-on="$listeners"
|
|
6
|
+
:color="brandBgColor"
|
|
7
|
+
:menuProps="{
|
|
8
|
+
top: !$vuetify.breakpoint.mdAndUp,
|
|
9
|
+
}"
|
|
10
|
+
class="hour-picker"
|
|
11
|
+
@select-input="handleSelectInput"
|
|
12
|
+
@input="handleInput"
|
|
13
|
+
>
|
|
14
|
+
<input
|
|
15
|
+
v-if="!$vuetify.breakpoint.mdAndUp"
|
|
16
|
+
class="native-time-input"
|
|
17
|
+
@input="handleNativeInput"
|
|
18
|
+
type="time"/>
|
|
19
|
+
</TextInputWithSelect>
|
|
20
|
+
<!-- prepend-inner-icon="far fa-clock"-->
|
|
21
|
+
<!-- clearable-->
|
|
22
|
+
<!-- clear-icon="far fa-times-circle"-->
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import TextInputWithSelect from "@/modules/common/components/TextInputWithSelect/TextInputWithSelect.vue"
|
|
27
|
+
import {convertTime12to24, convertTime24To12} from "@/modules/common/services/timeService.js"
|
|
28
|
+
export default {
|
|
29
|
+
components: {
|
|
30
|
+
TextInputWithSelect,
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
minutesInterval: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 30,
|
|
36
|
+
},
|
|
37
|
+
amPmMode: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
required: true,
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
shouldFilter: true,
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
created() {
|
|
48
|
+
this.shouldFilter = !this.$attrs.value
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
filterFunc(value, item) {
|
|
52
|
+
return !this.shouldFilter || !value || item.toString().toLowerCase().indexOf(value.toString().toLowerCase()) !== -1
|
|
53
|
+
},
|
|
54
|
+
handleSelectInput() {
|
|
55
|
+
this.shouldFilter = false
|
|
56
|
+
},
|
|
57
|
+
handleInput(value) {
|
|
58
|
+
this.shouldFilter = !!value
|
|
59
|
+
},
|
|
60
|
+
handleNativeInput(e) {
|
|
61
|
+
let newValue = e.target.value
|
|
62
|
+
if(this.amPmMode) {
|
|
63
|
+
newValue = convertTime24To12(newValue)
|
|
64
|
+
} else {
|
|
65
|
+
newValue = convertTime12to24(newValue)
|
|
66
|
+
}
|
|
67
|
+
this.$emit('input', newValue)
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
selectItems() {
|
|
72
|
+
var minutesInterval = this.minutesInterval;
|
|
73
|
+
var times = []; // time array
|
|
74
|
+
var startTime = 0; // start time
|
|
75
|
+
var ap = ['AM', 'PM']; // AM-PM
|
|
76
|
+
|
|
77
|
+
//loop to increment the time and push results in array
|
|
78
|
+
let dayLengthInMinutes = 24*60
|
|
79
|
+
for (let i=0; startTime < dayLengthInMinutes; i++) {
|
|
80
|
+
var hh = Math.floor(startTime / 60); // getting hours of day in 0-24 format
|
|
81
|
+
var mm = (startTime % 60); // getting minutes of the hour in 0-55 format
|
|
82
|
+
if(this.amPmMode) {
|
|
83
|
+
let hours = '';
|
|
84
|
+
if(hh === 0 || hh === 12) {
|
|
85
|
+
hours = '12'
|
|
86
|
+
} else {
|
|
87
|
+
hours = ("0" + (hh % 12)).slice(-2)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
times[i] = hours + ':' + ("0" + mm).slice(-2) + ' ' + ap[Math.floor(hh / 12)]; // pushing data in array in [00:00 - 12:00 AM/PM format]
|
|
91
|
+
} else {
|
|
92
|
+
times[i] = `${hh.toString().padStart(2,0)}:${mm.toString().padStart(2,0)}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
startTime = startTime + minutesInterval;
|
|
96
|
+
}
|
|
97
|
+
return times
|
|
98
|
+
},
|
|
99
|
+
brandBgColor() {
|
|
100
|
+
return this.$store && this.$store.getters['brandModule/secondaryColor'];
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<style lang="scss">
|
|
108
|
+
.hour-picker {
|
|
109
|
+
.native-time-input {
|
|
110
|
+
z-index: 7;
|
|
111
|
+
opacity: 0;
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 0;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
.v-menu__content {
|
|
119
|
+
max-height: 240px;
|
|
120
|
+
}
|
|
121
|
+
input {
|
|
122
|
+
letter-spacing: -0.2px;
|
|
123
|
+
}
|
|
124
|
+
.v-input__prepend-inner, .v-input__append-inner {
|
|
125
|
+
height: unset;
|
|
126
|
+
width: unset;
|
|
127
|
+
min-width: unset;
|
|
128
|
+
i {
|
|
129
|
+
font-size: 19px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
</style>
|