@iankibetsh/shframework 5.2.6 → 5.2.8

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.
@@ -31,6 +31,38 @@
31
31
  opacity: 0.5;
32
32
  }
33
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
+
34
66
  .permissions-main {
35
67
  background: #edeff2;
36
68
  }
@@ -79,42 +111,6 @@
79
111
  margin-right: 0.255em;
80
112
  }
81
113
 
82
- .colored-toast.swal2-icon-success {
83
- background-color: #a5dc86 !important;
84
- }
85
-
86
- .colored-toast.swal2-icon-error {
87
- background-color: #f27474 !important;
88
- }
89
-
90
- .colored-toast.swal2-icon-warning {
91
- background-color: #f8bb86 !important;
92
- }
93
-
94
- .colored-toast.swal2-icon-info {
95
- background-color: #3fc3ee !important;
96
- }
97
-
98
- .colored-toast.swal2-icon-question {
99
- background-color: #87adbd !important;
100
- }
101
-
102
- .colored-toast .swal2-title {
103
- color: white;
104
- }
105
-
106
- .colored-toast .swal2-close {
107
- color: white;
108
- }
109
-
110
- .colored-toast .swal2-html-container {
111
- color: white;
112
- }
113
-
114
- .sh-forgot-link, .sh-register-link{
115
- cursor: pointer;
116
- }
117
-
118
114
  .callout{
119
115
  --bs-link-color-rgb: 110,168,254;
120
116
  --bs-code-color: #e685b5;
@@ -130,3 +126,7 @@
130
126
  --bd-callout-bg: var(--bs-info-bg-subtle);
131
127
  --bd-callout-border: var(--bs-info-border-subtle);
132
128
  }
129
+
130
+ .sh-forgot-link, .sh-register-link{
131
+ cursor: pointer;
132
+ }
package/dist/library.js CHANGED
@@ -283,8 +283,14 @@ const showModal = modalId => {
283
283
  };
284
284
 
285
285
  const hideModal = modalId => {
286
- const modal = new bootstrap.Modal(document.getElementById(modalId));
287
- modal.hide();
286
+ const modalElement = document.getElementById(modalId);
287
+ const button = modalElement.querySelector('.sh-modal-close');
288
+ if(button){
289
+ button.click();
290
+ } else {
291
+ const modal = new bootstrap.Modal(modalElement);
292
+ modal.hide();
293
+ }
288
294
  };
289
295
 
290
296
  const showOffCanvas = offCanvasId => {
@@ -293,8 +299,14 @@ const showOffCanvas = offCanvasId => {
293
299
  };
294
300
 
295
301
  const hideOffCanvas = offCanvasId => {
296
- const offCanvas = new bootstrap.Offcanvas(document.getElementById(offCanvasId));
297
- offCanvas.hide();
302
+ const element = document.getElementById(offCanvasId);
303
+ const button = element.querySelector('.sh-offcanvas-close');
304
+ if(button){
305
+ button.click();
306
+ } else {
307
+ const offCanvas = new bootstrap.Offcanvas(element);
308
+ offCanvas.hide();
309
+ }
298
310
  };
299
311
 
300
312
  var shRepo = {
@@ -2103,7 +2115,7 @@ const _hoisted_2$i = {
2103
2115
  };
2104
2116
  const _hoisted_3$g = ["src"];
2105
2117
  const _hoisted_4$g = ["value"];
2106
- const _hoisted_5$d = ["disabled"];
2118
+ const _hoisted_5$e = ["disabled"];
2107
2119
 
2108
2120
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2109
2121
  return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
@@ -2135,7 +2147,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2135
2147
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2136
2148
  placeholder: "712345678",
2137
2149
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2138
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2150
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$e), [
2139
2151
  [vue.vModelText, $data.input]
2140
2152
  ])
2141
2153
  ]))
@@ -2151,7 +2163,7 @@ const _hoisted_1$r = {
2151
2163
  const _hoisted_2$h = ["id"];
2152
2164
  const _hoisted_3$f = { class: "sh-suggestions-holder" };
2153
2165
  const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2154
- const _hoisted_5$c = ["onClick"];
2166
+ const _hoisted_5$d = ["onClick"];
2155
2167
  const _hoisted_6$a = ["id"];
2156
2168
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2157
2169
  const _hoisted_8$8 = ["onClick"];
@@ -2326,7 +2338,7 @@ return (_ctx, _cache) => {
2326
2338
  type: "button",
2327
2339
  class: "btn-close border-start border-1 ms-1",
2328
2340
  "aria-label": "Close"
2329
- }, null, 8 /* PROPS */, _hoisted_5$c)
2341
+ }, null, 8 /* PROPS */, _hoisted_5$d)
2330
2342
  ]))
2331
2343
  }), 256 /* UNKEYED_FRAGMENT */))
2332
2344
  ]),
@@ -2747,7 +2759,7 @@ const _hoisted_3$e = {
2747
2759
  role: "alert"
2748
2760
  };
2749
2761
  const _hoisted_4$e = /*#__PURE__*/vue.createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2750
- const _hoisted_5$b = { key: 0 };
2762
+ const _hoisted_5$c = { key: 0 };
2751
2763
  const _hoisted_6$9 = { key: 1 };
2752
2764
  const _hoisted_7$8 = { class: "row" };
2753
2765
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2811,7 +2823,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2811
2823
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$e, [
2812
2824
  _hoisted_4$e,
2813
2825
  (_ctx.errorText)
2814
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$b, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2826
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$c, vue.toDisplayString(_ctx.errorText), 1 /* TEXT */))
2815
2827
  : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2816
2828
  vue.createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2817
2829
  ]))
@@ -3367,7 +3379,7 @@ const _hoisted_4$d = {
3367
3379
  key: 0,
3368
3380
  class: "text-danger sh-required"
3369
3381
  };
3370
- const _hoisted_5$a = ["innerHTML"];
3382
+ const _hoisted_5$b = ["innerHTML"];
3371
3383
  const _hoisted_6$8 = {
3372
3384
  key: 2,
3373
3385
  class: "form-notch"
@@ -3683,7 +3695,7 @@ return (_ctx, _cache) => {
3683
3695
  key: 1,
3684
3696
  class: vue.normalizeClass(getElementClass('formLabel')),
3685
3697
  innerHTML: field.label
3686
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3698
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$b))
3687
3699
  : vue.createCommentVNode("v-if", true),
3688
3700
  (vue.unref(isFloating))
3689
3701
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3736,12 +3748,12 @@ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3736
3748
  const _hoisted_2$e = { class: "modal-content" };
3737
3749
  const _hoisted_3$c = { class: "modal-header" };
3738
3750
  const _hoisted_4$c = { class: "modal-title flex-fill" };
3739
- const _hoisted_5$9 = /*#__PURE__*/vue.createElementVNode("button", {
3751
+ const _hoisted_5$a = /*#__PURE__*/vue.createElementVNode("button", {
3740
3752
  type: "button",
3741
- class: "btn btn-danger btn-sm",
3753
+ class: "btn-close sh-modal-close",
3742
3754
  "data-bs-dismiss": "modal",
3743
- "data-dismiss": "modal"
3744
- }, "×", -1 /* HOISTED */);
3755
+ "aria-label": "Close"
3756
+ }, null, -1 /* HOISTED */);
3745
3757
  const _hoisted_6$7 = { class: "modal-body" };
3746
3758
  const _hoisted_7$6 = { class: "section" };
3747
3759
 
@@ -3807,7 +3819,7 @@ return (_ctx, _cache) => {
3807
3819
  vue.createElementVNode("div", _hoisted_2$e, [
3808
3820
  vue.createElementVNode("div", _hoisted_3$c, [
3809
3821
  vue.createElementVNode("h3", _hoisted_4$c, vue.toDisplayString(__props.modalTitle), 1 /* TEXT */),
3810
- _hoisted_5$9
3822
+ _hoisted_5$a
3811
3823
  ]),
3812
3824
  vue.createElementVNode("div", _hoisted_6$7, [
3813
3825
  vue.createElementVNode("div", _hoisted_7$6, [
@@ -4064,7 +4076,14 @@ const _hoisted_3$a = {
4064
4076
  class: "offcanvas-title",
4065
4077
  id: "offcanvasScrollingLabel"
4066
4078
  };
4067
- const _hoisted_4$a = { class: "offcanvas-body" };
4079
+ const _hoisted_4$a = {
4080
+ type: "button",
4081
+ ref: "closecanvas",
4082
+ class: "btn-close sh-offcanvas-close",
4083
+ "data-bs-dismiss": "offcanvas",
4084
+ "aria-label": "Close"
4085
+ };
4086
+ const _hoisted_5$9 = { class: "offcanvas-body" };
4068
4087
 
4069
4088
  var script$l = {
4070
4089
  __name: 'ShCanvas',
@@ -4114,16 +4133,9 @@ return (_ctx, _cache) => {
4114
4133
  }, [
4115
4134
  vue.createElementVNode("div", _hoisted_2$c, [
4116
4135
  vue.createElementVNode("h5", _hoisted_3$a, vue.toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4117
- vue.createElementVNode("button", {
4118
- type: "button",
4119
- ref: "closecanvas",
4120
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.offcanvasClosed && _ctx.offcanvasClosed(...args))),
4121
- class: "btn-close text-reset",
4122
- "data-bs-dismiss": "offcanvas",
4123
- "aria-label": "Close"
4124
- }, null, 512 /* NEED_PATCH */)
4136
+ vue.createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
4125
4137
  ]),
4126
- vue.createElementVNode("div", _hoisted_4$a, [
4138
+ vue.createElementVNode("div", _hoisted_5$9, [
4127
4139
  vue.renderSlot(_ctx.$slots, "default")
4128
4140
  ])
4129
4141
  ], 10 /* CLASS, PROPS */, _hoisted_1$i))
package/dist/library.mjs CHANGED
@@ -271,8 +271,14 @@ const showModal = modalId => {
271
271
  };
272
272
 
273
273
  const hideModal = modalId => {
274
- const modal = new Modal(document.getElementById(modalId));
275
- modal.hide();
274
+ const modalElement = document.getElementById(modalId);
275
+ const button = modalElement.querySelector('.sh-modal-close');
276
+ if(button){
277
+ button.click();
278
+ } else {
279
+ const modal = new Modal(modalElement);
280
+ modal.hide();
281
+ }
276
282
  };
277
283
 
278
284
  const showOffCanvas = offCanvasId => {
@@ -281,8 +287,14 @@ const showOffCanvas = offCanvasId => {
281
287
  };
282
288
 
283
289
  const hideOffCanvas = offCanvasId => {
284
- const offCanvas = new Offcanvas(document.getElementById(offCanvasId));
285
- offCanvas.hide();
290
+ const element = document.getElementById(offCanvasId);
291
+ const button = element.querySelector('.sh-offcanvas-close');
292
+ if(button){
293
+ button.click();
294
+ } else {
295
+ const offCanvas = new Offcanvas(element);
296
+ offCanvas.hide();
297
+ }
286
298
  };
287
299
 
288
300
  var shRepo = {
@@ -2091,7 +2103,7 @@ const _hoisted_2$i = {
2091
2103
  };
2092
2104
  const _hoisted_3$g = ["src"];
2093
2105
  const _hoisted_4$g = ["value"];
2094
- const _hoisted_5$d = ["disabled"];
2106
+ const _hoisted_5$e = ["disabled"];
2095
2107
 
2096
2108
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2097
2109
  return (openBlock(), createElementBlock("div", _hoisted_1$s, [
@@ -2123,7 +2135,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
2123
2135
  onInput: _cache[2] || (_cache[2] = (...args) => ($options.updateValue && $options.updateValue(...args))),
2124
2136
  placeholder: "712345678",
2125
2137
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (($data.input) = $event))
2126
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$d), [
2138
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$e), [
2127
2139
  [vModelText, $data.input]
2128
2140
  ])
2129
2141
  ]))
@@ -2139,7 +2151,7 @@ const _hoisted_1$r = {
2139
2151
  const _hoisted_2$h = ["id"];
2140
2152
  const _hoisted_3$f = { class: "sh-suggestions-holder" };
2141
2153
  const _hoisted_4$f = { class: "badge bg-secondary m-1 sh-selected-item" };
2142
- const _hoisted_5$c = ["onClick"];
2154
+ const _hoisted_5$d = ["onClick"];
2143
2155
  const _hoisted_6$a = ["id"];
2144
2156
  const _hoisted_7$9 = ["id", "aria-labelledby"];
2145
2157
  const _hoisted_8$8 = ["onClick"];
@@ -2314,7 +2326,7 @@ return (_ctx, _cache) => {
2314
2326
  type: "button",
2315
2327
  class: "btn-close border-start border-1 ms-1",
2316
2328
  "aria-label": "Close"
2317
- }, null, 8 /* PROPS */, _hoisted_5$c)
2329
+ }, null, 8 /* PROPS */, _hoisted_5$d)
2318
2330
  ]))
2319
2331
  }), 256 /* UNKEYED_FRAGMENT */))
2320
2332
  ]),
@@ -2735,7 +2747,7 @@ const _hoisted_3$e = {
2735
2747
  role: "alert"
2736
2748
  };
2737
2749
  const _hoisted_4$e = /*#__PURE__*/createElementVNode("i", { class: "bi-exclamation-triangle-fill me-1" }, null, -1 /* HOISTED */);
2738
- const _hoisted_5$b = { key: 0 };
2750
+ const _hoisted_5$c = { key: 0 };
2739
2751
  const _hoisted_6$9 = { key: 1 };
2740
2752
  const _hoisted_7$8 = { class: "row" };
2741
2753
  const _hoisted_8$7 = { class: "fg-label control-label text-capitalize control-bel col-md-12 request-form-label mb-2" };
@@ -2799,7 +2811,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
2799
2811
  ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
2800
2812
  _hoisted_4$e,
2801
2813
  (_ctx.errorText)
2802
- ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2814
+ ? (openBlock(), createElementBlock("span", _hoisted_5$c, toDisplayString(_ctx.errorText), 1 /* TEXT */))
2803
2815
  : (openBlock(), createElementBlock("span", _hoisted_6$9, "Unexpected Error Occurred")),
2804
2816
  createCommentVNode(" <button @click=\"hideError\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>")
2805
2817
  ]))
@@ -3355,7 +3367,7 @@ const _hoisted_4$d = {
3355
3367
  key: 0,
3356
3368
  class: "text-danger sh-required"
3357
3369
  };
3358
- const _hoisted_5$a = ["innerHTML"];
3370
+ const _hoisted_5$b = ["innerHTML"];
3359
3371
  const _hoisted_6$8 = {
3360
3372
  key: 2,
3361
3373
  class: "form-notch"
@@ -3671,7 +3683,7 @@ return (_ctx, _cache) => {
3671
3683
  key: 1,
3672
3684
  class: normalizeClass(getElementClass('formLabel')),
3673
3685
  innerHTML: field.label
3674
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$a))
3686
+ }, null, 10 /* CLASS, PROPS */, _hoisted_5$b))
3675
3687
  : createCommentVNode("v-if", true),
3676
3688
  (unref(isFloating))
3677
3689
  ? (openBlock(), createElementBlock("div", _hoisted_6$8, [..._hoisted_10$6]))
@@ -3724,12 +3736,12 @@ const _hoisted_1$m = ["id", "data-bs-backdrop"];
3724
3736
  const _hoisted_2$e = { class: "modal-content" };
3725
3737
  const _hoisted_3$c = { class: "modal-header" };
3726
3738
  const _hoisted_4$c = { class: "modal-title flex-fill" };
3727
- const _hoisted_5$9 = /*#__PURE__*/createElementVNode("button", {
3739
+ const _hoisted_5$a = /*#__PURE__*/createElementVNode("button", {
3728
3740
  type: "button",
3729
- class: "btn btn-danger btn-sm",
3741
+ class: "btn-close sh-modal-close",
3730
3742
  "data-bs-dismiss": "modal",
3731
- "data-dismiss": "modal"
3732
- }, "×", -1 /* HOISTED */);
3743
+ "aria-label": "Close"
3744
+ }, null, -1 /* HOISTED */);
3733
3745
  const _hoisted_6$7 = { class: "modal-body" };
3734
3746
  const _hoisted_7$6 = { class: "section" };
3735
3747
 
@@ -3795,7 +3807,7 @@ return (_ctx, _cache) => {
3795
3807
  createElementVNode("div", _hoisted_2$e, [
3796
3808
  createElementVNode("div", _hoisted_3$c, [
3797
3809
  createElementVNode("h3", _hoisted_4$c, toDisplayString(__props.modalTitle), 1 /* TEXT */),
3798
- _hoisted_5$9
3810
+ _hoisted_5$a
3799
3811
  ]),
3800
3812
  createElementVNode("div", _hoisted_6$7, [
3801
3813
  createElementVNode("div", _hoisted_7$6, [
@@ -4052,7 +4064,14 @@ const _hoisted_3$a = {
4052
4064
  class: "offcanvas-title",
4053
4065
  id: "offcanvasScrollingLabel"
4054
4066
  };
4055
- const _hoisted_4$a = { class: "offcanvas-body" };
4067
+ const _hoisted_4$a = {
4068
+ type: "button",
4069
+ ref: "closecanvas",
4070
+ class: "btn-close sh-offcanvas-close",
4071
+ "data-bs-dismiss": "offcanvas",
4072
+ "aria-label": "Close"
4073
+ };
4074
+ const _hoisted_5$9 = { class: "offcanvas-body" };
4056
4075
 
4057
4076
  var script$l = {
4058
4077
  __name: 'ShCanvas',
@@ -4102,16 +4121,9 @@ return (_ctx, _cache) => {
4102
4121
  }, [
4103
4122
  createElementVNode("div", _hoisted_2$c, [
4104
4123
  createElementVNode("h5", _hoisted_3$a, toDisplayString(__props.canvasTitle), 1 /* TEXT */),
4105
- createElementVNode("button", {
4106
- type: "button",
4107
- ref: "closecanvas",
4108
- onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.offcanvasClosed && _ctx.offcanvasClosed(...args))),
4109
- class: "btn-close text-reset",
4110
- "data-bs-dismiss": "offcanvas",
4111
- "aria-label": "Close"
4112
- }, null, 512 /* NEED_PATCH */)
4124
+ createElementVNode("button", _hoisted_4$a, null, 512 /* NEED_PATCH */)
4113
4125
  ]),
4114
- createElementVNode("div", _hoisted_4$a, [
4126
+ createElementVNode("div", _hoisted_5$9, [
4115
4127
  renderSlot(_ctx.$slots, "default")
4116
4128
  ])
4117
4129
  ], 10 /* CLASS, PROPS */, _hoisted_1$i))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.2.6",
3
+ "version": "5.2.8",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",