@unlk/keymaster 1.0.6 → 1.0.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Unlock Keymaster v1.0.6 (https://unlock-com.github.io/keymaster)
2
+ * Unlock Keymaster v1.0.8 (https://unlock-com.github.io/keymaster)
3
3
  * Copyright 2022-2025 Unlk Developers
4
4
  */
5
5
  (function (global, factory) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Unlock Keymaster v1.0.6 (https://unlock-com.github.io/keymaster)
2
+ * Unlock Keymaster v1.0.8 (https://unlock-com.github.io/keymaster)
3
3
  * Copyright 2022-2025 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";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})})),t}var n={exports:{}},i={exports:{}},s={exports:{}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlk/keymaster",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,6 +20,7 @@
20
20
  // Mixins
21
21
  @import "theme/mixins/buttons";
22
22
  @import "theme/mixins/badge";
23
+ @import "theme/mixins/forms";
23
24
 
24
25
  // Theme
25
26
  @import "theme/variables";
@@ -1 +1,4 @@
1
+ @import "forms/validation";
1
2
  @import "forms/form-control";
3
+ @import "forms/form-check";
4
+ @import "forms/floating-labels";
@@ -459,6 +459,7 @@ $carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w
459
459
  $carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='#{$carousel-control-color}'><path d='M11.7482 5.87002C12.083 5.52822 12.083 4.97314 11.7482 4.63135L7.4625 0.256348C7.12768 -0.0854492 6.58393 -0.0854492 6.24911 0.256348C5.91429 0.598145 5.91429 1.15322 6.24911 1.49502L9.075 4.37705H0.857143C0.383036 4.37705 0 4.76807 0 5.25205C0 5.73604 0.383036 6.12705 0.857143 6.12705H9.07232L6.25179 9.00908C5.91696 9.35088 5.91696 9.90596 6.25179 10.2478C6.58661 10.5896 7.13036 10.5896 7.46518 10.2478L11.7509 5.87275L11.7482 5.87002Z'/></svg>") !default;
460
460
 
461
461
  // Tooltips
462
+ $tooltip-border-radius: var(--#{$prefix}border-radius-xs) !default;
462
463
  $tooltip-bg: var(--#{$prefix}primary) !default;
463
464
 
464
465
  // Progress
@@ -0,0 +1,12 @@
1
+ .form-floating {
2
+ // stylelint-disable-next-line selector-no-qualifying-type
3
+ > .form-select:not(:focus):has(option[value=""]:checked) {
4
+ text-indent: 100%;
5
+ white-space: nowrap;
6
+
7
+ ~ label {
8
+ opacity: 1;
9
+ transform: none;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,89 @@
1
+ .form-check-tiled {
2
+ position: relative;
3
+ padding-right: $spacer * .25;
4
+ padding-left: $spacer * .25;
5
+ margin-bottom: $spacer * .5;
6
+
7
+ input:checked {
8
+ label {
9
+ border-color: $primary;
10
+ }
11
+ }
12
+
13
+ .form-check-input {
14
+ position: absolute;
15
+ width: 1px;
16
+ height: 1px;
17
+ overflow: hidden;
18
+ clip: rect(0 0 0 0);
19
+ clip-path: inset(100%);
20
+ white-space: nowrap;
21
+
22
+ &:checked {
23
+ ~ .form-check-label {
24
+ border-color: $primary;
25
+
26
+ &::before {
27
+ background-color: $primary;
28
+ border-color: $primary;
29
+ opacity: 1;
30
+ transform: scale(1);
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ .form-check-label {
37
+ width: 100%;
38
+ margin-bottom: 0;
39
+ font-weight: $font-weight-bold;
40
+ text-align: left;
41
+ cursor: pointer;
42
+ border: rfs-value(2px) solid $gray-300;
43
+ @include border-radius($border-radius-sm);
44
+ @include transition(all .15s ease-in-out);
45
+ @include padding($spacer);
46
+ &:has(span) {
47
+ @extend .h5;
48
+ }
49
+ span {
50
+ display: block;
51
+ font-family: $font-family-base;
52
+ font-weight: $font-weight-normal;
53
+ @extend .fs-3;
54
+ }
55
+
56
+ &::before {
57
+ position: absolute;
58
+ top: 8px;
59
+ right: 12px;
60
+ width: 18px;
61
+ height: 18px;
62
+ content: "";
63
+ background-image: escape-svg(url("data:image/svg+xml, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='#{$white}'><path d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z'/></svg>"));
64
+ background-repeat: no-repeat;
65
+ background-position: center center;
66
+ background-size: 11px;
67
+ border: rfs-value(2px) solid $gray-400;
68
+ opacity: 0;
69
+ transform: scale(0);
70
+ @include border-radius($border-radius-pill);
71
+ @include transition(.25s ease);
72
+ }
73
+
74
+ i {
75
+ @extend .fs-1;
76
+ display: block;
77
+ margin-bottom: $spacer * .5;
78
+ }
79
+
80
+ &:hover {
81
+ border-color: $primary;
82
+
83
+ &::before {
84
+ opacity: 1;
85
+ transform: scale(1);
86
+ }
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,5 @@
1
+ @each $state, $data in $form-validation-states {
2
+ $color: map-get($data, color);
3
+ $border-color: $color;
4
+ @include form-check-tiled-validation-state($state, $color, $border-color);
5
+ }
@@ -0,0 +1,11 @@
1
+ @mixin form-check-tiled-validation-state($state, $color, $border-color: $color) {
2
+ .form-check.form-check-tiled > .form-check-input:#{$state} ~ .form-check-label,
3
+ .form-check.form-check-tiled > .form-check-input.is-#{$state} ~ .form-check-label {
4
+ color: $color;
5
+ border-color: $border-color;
6
+
7
+ &::before {
8
+ border-color: $border-color;
9
+ }
10
+ }
11
+ }