@unlk/keymaster 1.6.3 → 1.6.4

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,5 +1,5 @@
1
1
  /*!
2
- * Unlock Keymaster v1.6.3 (https://keymaster.unlock.com)
2
+ * Unlock Keymaster v1.6.4 (https://keymaster.unlock.com)
3
3
  * Copyright 2022-2026 Unlk Developers
4
4
  */
5
5
  (function (global, factory) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Unlock Keymaster v1.6.3 (https://keymaster.unlock.com)
2
+ * Unlock Keymaster v1.6.4 (https://keymaster.unlock.com)
3
3
  * Copyright 2022-2026 Unlk Developers
4
4
  */
5
5
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).keymaster={})}(this,function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}var i,s={exports:{}},o={exports:{}},r={exports:{}};function a(){return i||(i=1,function(e){e.exports=function(){const e=new Map,t={set(t,n,i){e.has(t)||e.set(t,new Map);const s=e.get(t);(s.has(n)||0===s.size)&&s.set(n,i)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const i=e.get(t);i.delete(n),0===i.size&&e.delete(t)}};return t}()}(r)),r.exports}var l,c={exports:{}},u={exports:{}};function d(){return l||(l=1,function(e,t){!function(e){const t=1e6,n=1e3,i="transitionend",s=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),o=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),r=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},a=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const s=Number.parseFloat(t),o=Number.parseFloat(i);return s||o?(t=t.split(",")[0],i=i.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(i))*n):0},l=e=>{e.dispatchEvent(new Event(i))},c=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),u=e=>c(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(s(e)):null,d=e=>{if(!c(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},h=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),f=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?f(e.parentNode):null},p=()=>{},g=e=>{e.offsetHeight},m=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=e=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of _)e()}),_.push(e)):e()},v=()=>"rtl"===document.documentElement.dir,y=e=>{b(()=>{const t=m();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}})},w=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,E=(e,t,n=!0)=>{if(!n)return void w(e);const s=5,o=a(t)+s;let r=!1;const c=({target:n})=>{n===t&&(r=!0,t.removeEventListener(i,c),w(e))};t.addEventListener(i,c),setTimeout(()=>{r||l(t)},o)},A=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])};e.defineJQueryPlugin=y,e.execute=w,e.executeAfterTransition=E,e.findShadowRoot=f,e.getElement=u,e.getNextActiveElement=A,e.getTransitionDurationFromElement=a,e.getUID=r,e.getjQuery=m,e.isDisabled=h,e.isElement=c,e.isRTL=v,e.isVisible=d,e.noop=p,e.onDOMContentLoaded=b,e.parseSelector=s,e.reflow=g,e.toType=o,e.triggerTransitionEnd=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)}(0,u.exports)),u.exports}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlk/keymaster",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -4,15 +4,15 @@
4
4
  align-items: center;
5
5
 
6
6
  // Icon on the left, add margin to its right
7
- > i:first-child,
8
- > .icon:first-child {
7
+ > i:first-child:not(:only-child),
8
+ > .icon:first-child:not(:only-child) {
9
9
  width: fit-content;
10
10
  margin-right: $spacer * .5;
11
11
  }
12
12
 
13
13
  // Icon on the right, add margin to its left
14
- > i:last-child,
15
- > .icon:last-child {
14
+ > i:last-child:not(:only-child),
15
+ > .icon:last-child:not(:only-child) {
16
16
  width: fit-content;
17
17
  margin-left: $spacer * .5;
18
18
  }
@@ -30,27 +30,29 @@
30
30
  }
31
31
  .btn-#{$color} {
32
32
  @if $color == "secondary" {
33
- @include button-variant(
33
+ @include custom-button-variant(
34
34
  $value,
35
35
  $value,
36
36
  $hover-background: tint-color($value, $btn-hover-bg-shade-amount),
37
37
  $hover-border: tint-color($value, $btn-hover-border-shade-amount),
38
38
  $active-background: tint-color($value, $btn-active-bg-shade-amount),
39
39
  $active-border: tint-color($value, $btn-active-border-shade-amount),
40
- $disabled-color: $gray-900
40
+
41
41
  );
42
42
  } @else {
43
- @include button-variant(
43
+ @include custom-button-variant(
44
44
  $value,
45
45
  $value,
46
46
  $hover-background: shade-color($value, $btn-hover-bg-shade-amount),
47
47
  $hover-border: shade-color($value, $btn-hover-border-shade-amount),
48
48
  $active-background: shade-color($value, $btn-active-bg-shade-amount),
49
49
  $active-border: shade-color($value, $btn-active-border-shade-amount),
50
- $disabled-color: $white
51
50
  );
52
51
  }
53
52
  }
53
+ .btn-outline-#{$color} {
54
+ @include custom-button-outline-variant($value);
55
+ }
54
56
  .btn-icon-#{$color} {
55
57
  @if $color == "secondary" {
56
58
  @include button-icon-variant(
@@ -69,7 +71,6 @@
69
71
  $hover-border: shade-color($value, $btn-hover-border-shade-amount),
70
72
  $active-background: shade-color($value, $btn-active-bg-shade-amount),
71
73
  $active-border: shade-color($value, $btn-active-border-shade-amount),
72
- $disabled-color: $white
73
74
  );
74
75
  }
75
76
  }
@@ -87,7 +88,6 @@
87
88
 
88
89
  [class*="btn-icon-"],
89
90
  [class*="btn-icon-outline-"] {
90
-
91
91
  &.btn-sm {
92
92
  width: rfs-value(32px);
93
93
  height: rfs-value(32px);
@@ -100,6 +100,7 @@
100
100
  height: rfs-value(48px);
101
101
  }
102
102
  }
103
+
103
104
  .btn-sm {
104
105
  > i:first-child,
105
106
  > .icon:first-child {
@@ -382,6 +382,7 @@ $btn-active-bg-shade-amount: 40% !default;
382
382
  $btn-active-bg-tint-amount: 20% !default;
383
383
  $btn-active-border-shade-amount: 40% !default;
384
384
  $btn-active-border-tint-amount: 10% !default;
385
+ $btn-disabled-opacity: 1 !default;
385
386
 
386
387
  // Border Radius
387
388
  $border-radius: .5rem !default;
@@ -1,2 +1,2 @@
1
1
  // GENERATED FILE – do not edit manually
2
- $km-version: "1.6.3" !default;
2
+ $km-version: "1.6.4" !default;
@@ -1,5 +1,4 @@
1
- // scss-docs-start btn-variant-mixin
2
- @mixin button-variant(
1
+ @mixin custom-button-variant(
3
2
  $background,
4
3
  $border,
5
4
  $color: color-contrast($background),
@@ -9,9 +8,9 @@
9
8
  $active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
10
9
  $active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
11
10
  $active-color: color-contrast($active-background),
12
- $disabled-background: rgba($background, 1),
13
- $disabled-border: rgba($border, 1),
14
- $disabled-color: color-contrast($disabled-background)
11
+ $disabled-background: $gray-200,
12
+ $disabled-border: $gray-200,
13
+ $disabled-color: $gray-400
15
14
  ) {
16
15
  --#{$prefix}btn-color: #{$color};
17
16
  --#{$prefix}btn-bg: #{$background};
@@ -28,7 +27,35 @@
28
27
  --#{$prefix}btn-disabled-bg: #{$disabled-background};
29
28
  --#{$prefix}btn-disabled-border-color: #{$disabled-border};
30
29
  }
31
- // scss-docs-end btn-variant-mixin
30
+
31
+ @mixin custom-button-outline-variant(
32
+ $color,
33
+ $btn-color: $color,
34
+ $btn-border: $color,
35
+ $color-hover: $color,
36
+ $hover-background: tint-color($color, 90%),
37
+ $hover-border: $color,
38
+ $active-background: shade-color($color, 20%),
39
+ $active-border: shade-color($color, 20%),
40
+ $active-color: color-contrast($active-background),
41
+ $disabled-color: $gray-400,
42
+ $disabled-border: $gray-200,
43
+ ) {
44
+ --#{$prefix}btn-color: #{$btn-color};
45
+ --#{$prefix}btn-border-color: #{$btn-border};
46
+ --#{$prefix}btn-hover-color: #{$color-hover};
47
+ --#{$prefix}btn-hover-bg: #{$hover-background};
48
+ --#{$prefix}btn-hover-border-color: #{$hover-border};
49
+ --#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
50
+ --#{$prefix}btn-active-color: #{$active-color};
51
+ --#{$prefix}btn-active-bg: #{$active-background};
52
+ --#{$prefix}btn-active-border-color: #{$active-border};
53
+ --#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
54
+ --#{$prefix}btn-disabled-color: #{$disabled-color};
55
+ --#{$prefix}btn-disabled-bg: transparent;
56
+ --#{$prefix}btn-disabled-border-color: #{$disabled-border};
57
+ --#{$prefix}gradient: none;
58
+ }
32
59
 
33
60
  @mixin button-link-variant(
34
61
  $color,
@@ -37,7 +64,7 @@
37
64
  $active-background: shade-color($color, 20%),
38
65
  $active-border: $color,
39
66
  $active-color: $white,
40
- $disabled-color: $gray-300
67
+ $disabled-color: $gray-400
41
68
  ) {
42
69
  --#{$prefix}btn-color: #{$btn-color};
43
70
  --#{$prefix}btn-bg: transparent;
@@ -65,9 +92,9 @@
65
92
  $active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
66
93
  $active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
67
94
  $active-color: color-contrast($active-background),
68
- $disabled-background: rgba($background, 1),
69
- $disabled-border: rgba($border, 1),
70
- $disabled-color: color-contrast($disabled-background)
95
+ $disabled-background: $gray-200,
96
+ $disabled-border: $gray-200,
97
+ $disabled-color: $gray-400,
71
98
  ) {
72
99
  width: rfs-value(40px);
73
100
  height: rfs-value(40px);
@@ -100,8 +127,8 @@
100
127
  $active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
101
128
  $active-color: color-contrast($active-background),
102
129
  $disabled-background: transparent,
103
- $disabled-border: rgba($border, 1),
104
- $disabled-color: rgba($color, 1)
130
+ $disabled-border: $gray-200,
131
+ $disabled-color: $gray-400
105
132
  ) {
106
133
  width: rfs-value(40px);
107
134
  height: rfs-value(40px);