@iankibetsh/shframework 1.5.1 → 1.5.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.
@@ -1,36 +1,4 @@
1
1
 
2
- .colored-toast.swal2-icon-success {
3
- background-color: #a5dc86 !important;
4
- }
5
-
6
- .colored-toast.swal2-icon-error {
7
- background-color: #f27474 !important;
8
- }
9
-
10
- .colored-toast.swal2-icon-warning {
11
- background-color: #f8bb86 !important;
12
- }
13
-
14
- .colored-toast.swal2-icon-info {
15
- background-color: #3fc3ee !important;
16
- }
17
-
18
- .colored-toast.swal2-icon-question {
19
- background-color: #87adbd !important;
20
- }
21
-
22
- .colored-toast .swal2-title {
23
- color: white;
24
- }
25
-
26
- .colored-toast .swal2-close {
27
- color: white;
28
- }
29
-
30
- .colored-toast .swal2-html-container {
31
- color: white;
32
- }
33
-
34
2
  .sh-phone{
35
3
  display: flex;
36
4
  width: 100%;
@@ -63,6 +31,38 @@
63
31
  opacity: 0.5;
64
32
  }
65
33
 
34
+ .colored-toast.swal2-icon-success {
35
+ background-color: #a5dc86 !important;
36
+ }
37
+
38
+ .colored-toast.swal2-icon-error {
39
+ background-color: #f27474 !important;
40
+ }
41
+
42
+ .colored-toast.swal2-icon-warning {
43
+ background-color: #f8bb86 !important;
44
+ }
45
+
46
+ .colored-toast.swal2-icon-info {
47
+ background-color: #3fc3ee !important;
48
+ }
49
+
50
+ .colored-toast.swal2-icon-question {
51
+ background-color: #87adbd !important;
52
+ }
53
+
54
+ .colored-toast .swal2-title {
55
+ color: white;
56
+ }
57
+
58
+ .colored-toast .swal2-close {
59
+ color: white;
60
+ }
61
+
62
+ .colored-toast .swal2-html-container {
63
+ color: white;
64
+ }
65
+
66
66
  .permissions-main {
67
67
  background: #edeff2;
68
68
  }
package/dist/library.js CHANGED
@@ -2906,7 +2906,7 @@ script$j.__file = "src/lib/components/form-components/NumberInput.vue";
2906
2906
 
2907
2907
  var script$i = {
2908
2908
  __name: 'TextInput',
2909
- props: ['modelValue','label'],
2909
+ props: ['modelValue','label','isInvalid'],
2910
2910
  emits: ['update:modelValue','clearValidationErrors'],
2911
2911
  setup(__props, { emit }) {
2912
2912
 
@@ -3137,7 +3137,7 @@ const getFieldComponent = (fieldObj)=>{
3137
3137
  return props.customComponents[field]
3138
3138
  }
3139
3139
  if(fieldObj.type){
3140
- return fieldObj.type === 'number' ? NumberComponent:fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type ? SelectComponent:TextComponent
3140
+ return fieldObj.type === 'number' ? NumberComponent:fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type === 'password' ? PasswordComponent:fieldObj.type === 'select' ? SelectComponent:TextComponent
3141
3141
  }else
3142
3142
  if(passwords.includes(field)){
3143
3143
  return PasswordComponent
@@ -3270,12 +3270,13 @@ return (_ctx, _cache) => {
3270
3270
  }, null, 10 /* CLASS, PROPS */, _hoisted_2$a))
3271
3271
  : vue.createCommentVNode("v-if", true),
3272
3272
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getFieldComponent(field)), vue.mergeProps(getComponentProps(field), {
3273
+ isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
3273
3274
  onClick: $event => (removeValidationError(field.field)),
3274
3275
  "onUpdate:modelValue": [$event => (removeValidationError(field.field)), $event => ((formFields.value[index].value) = $event)],
3275
3276
  modelValue: formFields.value[index].value,
3276
3277
  placeholder: vue.unref(isFloating) ? field.label:field.placeholder,
3277
3278
  class: getComponentClass(field.field)
3278
- }), null, 16 /* FULL_PROPS */, ["onClick", "onUpdate:modelValue", "modelValue", "placeholder", "class"])),
3279
+ }), null, 16 /* FULL_PROPS */, ["isInvalid", "onClick", "onUpdate:modelValue", "modelValue", "placeholder", "class"])),
3279
3280
  (vue.unref(isFloating) && field.label)
3280
3281
  ? (vue.openBlock(), vue.createElementBlock("label", {
3281
3282
  key: 1,
package/dist/library.mjs CHANGED
@@ -2893,7 +2893,7 @@ script$j.__file = "src/lib/components/form-components/NumberInput.vue";
2893
2893
 
2894
2894
  var script$i = {
2895
2895
  __name: 'TextInput',
2896
- props: ['modelValue','label'],
2896
+ props: ['modelValue','label','isInvalid'],
2897
2897
  emits: ['update:modelValue','clearValidationErrors'],
2898
2898
  setup(__props, { emit }) {
2899
2899
 
@@ -3124,7 +3124,7 @@ const getFieldComponent = (fieldObj)=>{
3124
3124
  return props.customComponents[field]
3125
3125
  }
3126
3126
  if(fieldObj.type){
3127
- return fieldObj.type === 'number' ? NumberComponent:fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type ? SelectComponent:TextComponent
3127
+ return fieldObj.type === 'number' ? NumberComponent:fieldObj.type === 'textarea' ? TextAreaComponent : fieldObj.type === 'email' ? EmailComponent : fieldObj.type === 'phone' ? PhoneComponent : fieldObj.type === 'password' ? PasswordComponent:fieldObj.type === 'select' ? SelectComponent:TextComponent
3128
3128
  }else
3129
3129
  if(passwords.includes(field)){
3130
3130
  return PasswordComponent
@@ -3257,12 +3257,13 @@ return (_ctx, _cache) => {
3257
3257
  }, null, 10 /* CLASS, PROPS */, _hoisted_2$a))
3258
3258
  : createCommentVNode("v-if", true),
3259
3259
  (openBlock(), createBlock(resolveDynamicComponent(getFieldComponent(field)), mergeProps(getComponentProps(field), {
3260
+ isInvalid: typeof validationErrors.value[field.field] !== 'undefined',
3260
3261
  onClick: $event => (removeValidationError(field.field)),
3261
3262
  "onUpdate:modelValue": [$event => (removeValidationError(field.field)), $event => ((formFields.value[index].value) = $event)],
3262
3263
  modelValue: formFields.value[index].value,
3263
3264
  placeholder: unref(isFloating) ? field.label:field.placeholder,
3264
3265
  class: getComponentClass(field.field)
3265
- }), null, 16 /* FULL_PROPS */, ["onClick", "onUpdate:modelValue", "modelValue", "placeholder", "class"])),
3266
+ }), null, 16 /* FULL_PROPS */, ["isInvalid", "onClick", "onUpdate:modelValue", "modelValue", "placeholder", "class"])),
3266
3267
  (unref(isFloating) && field.label)
3267
3268
  ? (openBlock(), createElementBlock("label", {
3268
3269
  key: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",