oo-loop 0.5.1 → 0.6.0

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.
Files changed (37) hide show
  1. package/dist/loop.css +189 -625
  2. package/dist/loop.min.css +1 -1
  3. package/package.json +4 -3
  4. package/scss/_loop.scss +23 -27
  5. package/scss/_variables.scss +6 -2
  6. package/scss/base/_base.scss +11 -19
  7. package/scss/base/_type.scss +27 -63
  8. package/scss/components/_button.scss +56 -84
  9. package/scss/components/_columns.scss +69 -89
  10. package/scss/components/_form.scss +5 -7
  11. package/scss/components/_grid.scss +50 -62
  12. package/scss/components/form/_checkbox.scss +33 -41
  13. package/scss/components/form/_input.scss +12 -74
  14. package/scss/components/form/_mixin.scss +47 -0
  15. package/scss/components/form/_radio.scss +27 -34
  16. package/scss/components/form/_select.scss +38 -46
  17. package/scss/components/form/_toggle.scss +21 -30
  18. package/scss/functions/_array.scss +12 -8
  19. package/scss/functions/_empty.scss +6 -3
  20. package/scss/functions/_index.scss +7 -0
  21. package/scss/functions/_map.scss +4 -2
  22. package/scss/functions/_replace.scss +7 -4
  23. package/scss/functions/_split.scss +10 -6
  24. package/scss/functions/_type.scss +5 -3
  25. package/scss/mixins/_breakpoint.scss +12 -22
  26. package/scss/mixins/_loop.scss +19 -17
  27. package/scss/utilities/_color.scss +9 -18
  28. package/scss/utilities/_container.scss +9 -10
  29. package/scss/utilities/_float.scss +7 -11
  30. package/scss/utilities/_list.scss +9 -14
  31. package/scss/utilities/_spacing.scss +29 -40
  32. package/scss/utilities/_text.scss +19 -64
  33. package/scss/utilities/_visibility.scss +10 -9
  34. package/scss/utilities/_wrapper.scss +5 -10
  35. package/scss/base/_all.scss +0 -9
  36. package/scss/functions/_all.scss +0 -9
  37. package/scss/mixins/_all.scss +0 -7
@@ -1,55 +1,44 @@
1
- /**
2
- * Grid
3
- */
4
-
5
- $use-grid-layout: true !default;
6
- $use-grid-areas: true !default;
7
- $use-grid-order: true !default;
8
- $use-grid-gap: true !default;
9
- $use-v-grid-gap: true !default;
10
-
11
- $grid-gap: $columns-gutter !default;
12
- $grid-system: $columns-system !default;
13
- $grid-template-areas: () !default ;
14
-
15
- $grid-gap-sizes: $columns-gutter-sizes !default;
16
- $grid-v-gap-sizes: $grid-gap-sizes !default;
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+ @use '../variables' as v;
4
+ @use '../mixins/breakpoint';
5
+ @use '../functions' as fn;
17
6
 
18
7
 
19
8
  // Grid layout
20
- @if $use-grid-layout {
21
- [#{$loop-component-prefix}-grid~="layout"] {
9
+ @if v.$use-grid-layout {
10
+ [#{v.$loop-component-prefix}-grid~="layout"] {
22
11
  display: grid;
23
- grid-template-columns: repeat($grid-system, 1fr);
24
- grid-gap: $grid-gap;
12
+ grid-template-columns: repeat(v.$grid-system, 1fr);
13
+ grid-gap: v.$grid-gap;
25
14
  }
26
15
 
27
- [#{$loop-component-prefix}-grid*="col"],
28
- [#{$loop-component-prefix}-grid*="row"] {
16
+ [#{v.$loop-component-prefix}-grid*="col"],
17
+ [#{v.$loop-component-prefix}-grid*="row"] {
29
18
  min-width: 0;
30
19
  }
31
20
 
32
- @each $class in $breakpoints-classes-width-default-value {
33
- @include breakpoint($class) {
21
+ @each $class in v.$breakpoints-classes-width-default-value {
22
+ @include breakpoint.from($class) {
34
23
  $suffix: '';
35
24
  @if $class != '' {
36
25
  $suffix: \@#{$class};
37
26
  }
38
- @for $i from 1 through $grid-system {
39
- [#{$loop-component-prefix}-grid~="col-#{$i}#{$suffix}"] { grid-column: span $i; }
40
- [#{$loop-component-prefix}-grid~="row-#{$i}#{$suffix}"] { grid-row: span $i; }
27
+ @for $i from 1 through v.$grid-system {
28
+ [#{v.$loop-component-prefix}-grid~="col-#{$i}#{$suffix}"] { grid-column: span $i; }
29
+ [#{v.$loop-component-prefix}-grid~="row-#{$i}#{$suffix}"] { grid-row: span $i; }
41
30
  }
42
31
  }
43
32
  }
44
33
 
45
- @if $use-grid-order {
46
- @each $class in $breakpoints-classes {
47
- @include breakpoint($class) {
34
+ @if v.$use-grid-order {
35
+ @each $class in v.$breakpoints-classes {
36
+ @include breakpoint.from($class) {
48
37
  $suffix: \@#{$class};
49
38
  // order-0 to make sure it is first
50
- [#{$loop-component-prefix}-grid~="order-0#{$suffix}"] { order: -1; }
51
- @for $i from 1 through $grid-system {
52
- [#{$loop-component-prefix}-grid~="order-#{$i}#{$suffix}"] { order: $i; }
39
+ [#{v.$loop-component-prefix}-grid~="order-0#{$suffix}"] { order: -1; }
40
+ @for $i from 1 through v.$grid-system {
41
+ [#{v.$loop-component-prefix}-grid~="order-#{$i}#{$suffix}"] { order: $i; }
53
42
  }
54
43
  }
55
44
  }
@@ -61,10 +50,10 @@ $grid-v-gap-sizes: $grid-gap-sizes !default;
61
50
  @function getAreaNames($areas) {
62
51
  $list: ();
63
52
  @each $area in $areas {
64
- $areaNames: split(' ', $area);
53
+ $areaNames: fn.split(' ', $area);
65
54
  @each $areaName in $areaNames {
66
- @if notInList($areaName, $list) {
67
- $list: join($list, $areaName);
55
+ @if fn.notInList($areaName, $list) {
56
+ $list: list.join($list, $areaName);
68
57
  }
69
58
  }
70
59
  }
@@ -72,8 +61,8 @@ $grid-v-gap-sizes: $grid-gap-sizes !default;
72
61
  }
73
62
  @function getAreaColumnNumber($areas) {
74
63
  @each $area in $areas {
75
- $areaNames: split(' ', $area);
76
- @return length($areaNames);
64
+ $areaNames: fn.split(' ', $area);
65
+ @return list.length($areaNames);
77
66
  }
78
67
  }
79
68
 
@@ -83,7 +72,7 @@ $grid-v-gap-sizes: $grid-gap-sizes !default;
83
72
  }
84
73
  @mixin makeGridArea($areaNames) {
85
74
  @each $area in $areaNames {
86
- [#{$loop-component-prefix}-grid~="#{$area}"] {
75
+ [#{v.$loop-component-prefix}-grid~="#{$area}"] {
87
76
  grid-area: #{$area};
88
77
  min-width: 0;
89
78
  }
@@ -97,46 +86,45 @@ $grid-v-gap-sizes: $grid-gap-sizes !default;
97
86
  $area-names-list: ();
98
87
  @each $breakpoint, $areas in $grid-template-areas {
99
88
  $area-names-list: getAreaNames(join($area-names-list, getAreaNames($areas)));
100
- @include breakpoint($breakpoint) {
89
+ @include breakpoint.from($breakpoint) {
101
90
  @include makeGridTemplate($areas);
102
91
  }
103
92
  }
104
93
  @include makeGridArea($area-names-list);
105
94
  }
106
95
 
107
- @if $use-grid-areas and isNotEmpty($grid-template-areas) {
96
+ @if v.$use-grid-areas and fn.isNotEmpty(v.$grid-template-areas) {
108
97
 
109
- [#{$loop-component-prefix}-grid~="areas"] {
98
+ [#{v.$loop-component-prefix}-grid~="areas"] {
110
99
  display: grid;
111
- grid-gap: $grid-gap;
100
+ grid-gap: v.$grid-gap;
112
101
  }
113
102
 
114
- @if isList($grid-template-areas) {
115
- [#{$loop-component-prefix}-grid~="areas"] {
116
- @include makeGrid($grid-template-areas);
103
+ @if fn.isList(v.$grid-template-areas) {
104
+ [#{v.$loop-component-prefix}-grid~="areas"] {
105
+ @include makeGrid(v.$grid-template-areas);
117
106
  }
118
- } @else if isMap($grid-template-areas) {
107
+ } @else if fn.isMap(v.$grid-template-areas) {
119
108
 
120
109
  // are keys Breakpoints ?
121
110
  $are-keys-breakpoints: false;
122
- $map-keys: map-keys($grid-template-areas);
111
+ $map-keys: map.keys(v.$grid-template-areas);
123
112
  @each $key in $map-keys {
124
- @if inList($key, $breakpoints-classes) {
113
+ @if fn.inList($key, $breakpoints-classes) {
125
114
  $are-keys-breakpoints: true;
126
- @break;
127
115
  }
128
116
  }
129
117
 
130
118
  @if $are-keys-breakpoints {
131
- [#{$loop-component-prefix}-grid~="areas"] {
132
- @include makeGridOnBreakpoints($grid-template-areas);
119
+ [#{v.$loop-component-prefix}-grid~="areas"] {
120
+ @include makeGridOnBreakpoints(v.$grid-template-areas);
133
121
  }
134
122
  } @else {
135
- @each $grid-name, $grid-sub-areas in $grid-template-areas {
136
- [#{$loop-component-prefix}-grid~="areas"][#{$loop-component-prefix}-grid~="#{$grid-name}"] {
137
- @if isMap($grid-sub-areas) {
123
+ @each $grid-name, $grid-sub-areas in v.$grid-template-areas {
124
+ [#{v.$loop-component-prefix}-grid~="areas"][#{v.$loop-component-prefix}-grid~="#{$grid-name}"] {
125
+ @if fn.isMap($grid-sub-areas) {
138
126
  @include makeGridOnBreakpoints($grid-sub-areas);
139
- } @else if isList($grid-sub-areas) {
127
+ } @else if fn.isList($grid-sub-areas) {
140
128
  @include makeGrid($grid-sub-areas);
141
129
  }
142
130
  }
@@ -146,13 +134,13 @@ $grid-v-gap-sizes: $grid-gap-sizes !default;
146
134
  }
147
135
 
148
136
  // Grid Gap
149
- @if $use-grid-gap {
150
- @each $gap-name, $gap-size in $grid-gap-sizes {
151
- [#{$loop-component-prefix}-grid~="gap-#{$gap-name}"] { grid-gap: $gap-size; }
137
+ @if v.$use-grid-gap {
138
+ @each $gap-name, $gap-size in v.$grid-gap-sizes {
139
+ [#{v.$loop-component-prefix}-grid~="gap-#{$gap-name}"] { grid-gap: $gap-size; }
152
140
  }
153
141
  }
154
- @if $use-grid-gap and $use-v-grid-gap {
155
- @each $gap-name, $gap-size in $grid-v-gap-sizes {
156
- [#{$loop-component-prefix}-grid~="v-gap-#{$gap-name}"] { grid-row-gap: $gap-size; }
142
+ @if v.$use-grid-gap and v.$use-v-grid-gap {
143
+ @each $gap-name, $gap-size in v.$grid-v-gap-sizes {
144
+ [#{v.$loop-component-prefix}-grid~="v-gap-#{$gap-name}"] { grid-row-gap: $gap-size; }
157
145
  }
158
146
  }
@@ -1,22 +1,14 @@
1
1
  @use 'sass:math';
2
+ @use '../../mixins/breakpoint';
3
+ @use '../../mixins/loop';
4
+ @use '../../functions' as fn;
5
+ @use '../../variables' as v;
6
+ @use 'mixin' as m;
2
7
 
3
8
  /**
4
9
  * Checkbox
5
10
  */
6
11
 
7
- $checkbox-size: 1.8rem !default;
8
- $checkbox-bgcolor: $input-bgcolor !default;
9
- $checkbox-border-color: $input-border-color !default;
10
- $checkbox-border-radus: $input-border-radius !default;
11
- $checkbox-box-shadow: 1px 1px 2px 0 rgba(#aaa, .3) !default;
12
- $checkbox-checked-color: $input-color !default;
13
- $checkbox-checked-bgcolor: $input-bgcolor !default;
14
- $checkbox-checked-border-color: $checkbox-border-color !default;
15
-
16
- $use-checkbox-animation: true !default;
17
- $checkbox-sizes:() !default;
18
- $checkbox-breakpoints-classes:() !default;
19
-
20
12
  @mixin checkbox-size($size) {
21
13
  $checked_width: ($size * 0.4);
22
14
  $checked_height: ($size * 0.6);
@@ -25,7 +17,7 @@ $checkbox-breakpoints-classes:() !default;
25
17
  & + label {
26
18
  &::before {
27
19
  left: math.div($size, 2) - math.div($checked_width, 2) + math.div($checked_border-width, 3);
28
- @if $use-checkbox-animation {
20
+ @if v.$use-checkbox-animation {
29
21
  min-width: ($checked_width * 2);
30
22
  min-height: ($checked_height * 2);
31
23
  border-right-width: ($checked_border-width * 2);
@@ -38,7 +30,7 @@ $checkbox-breakpoints-classes:() !default;
38
30
  min-height: $size;
39
31
  }
40
32
 
41
- & + [#{$loop-component-prefix}-form~="checkbox"] + label { margin-top: math.div($size, 3); }
33
+ & + [#{v.$loop-component-prefix}-form~="checkbox"] + label { margin-top: math.div($size, 3); }
42
34
  }
43
35
  &:checked + label::before {
44
36
  min-width: $checked_width;
@@ -48,7 +40,7 @@ $checkbox-breakpoints-classes:() !default;
48
40
  }
49
41
  }
50
42
 
51
- [#{$loop-component-prefix}-form~="checkbox"] {
43
+ [#{v.$loop-component-prefix}-form~="checkbox"] {
52
44
  position: absolute;
53
45
  opacity: 0;
54
46
 
@@ -58,7 +50,7 @@ $checkbox-breakpoints-classes:() !default;
58
50
  align-items: center;
59
51
  width: fit-content;
60
52
  line-height: 1.1;
61
- font-weight: $font-weight-base;
53
+ font-weight: v.$font-weight-base;
62
54
 
63
55
  &::before {
64
56
  position: absolute;
@@ -71,7 +63,7 @@ $checkbox-breakpoints-classes:() !default;
71
63
 
72
64
  transform: rotateZ(40deg);
73
65
 
74
- @if $use-checkbox-animation {
66
+ @if v.$use-checkbox-animation {
75
67
  transition: border 200ms ease-in-out, min-width 200ms ease-in-out, min-height 200ms ease-in-out;
76
68
  }
77
69
  }
@@ -79,12 +71,12 @@ $checkbox-breakpoints-classes:() !default;
79
71
  display: flex;
80
72
  order: -1;
81
73
  content:'';
82
- border: 1px solid $checkbox-border-color;
83
- border-radius: $checkbox-border-radus;
84
- background-color: $checkbox-bgcolor;
85
- box-shadow: $checkbox-box-shadow;
74
+ border: 1px solid v.$checkbox-border-color;
75
+ border-radius: v.$checkbox-border-radus;
76
+ background-color: v.$checkbox-bgcolor;
77
+ box-shadow: v.$checkbox-box-shadow;
86
78
 
87
- @if $use-checkbox-animation {
79
+ @if v.$use-checkbox-animation {
88
80
  transition: background-color 300ms ease-in-out;
89
81
  }
90
82
  }
@@ -92,39 +84,39 @@ $checkbox-breakpoints-classes:() !default;
92
84
 
93
85
  &:checked + label {
94
86
  &::before {
95
- border-right-color: $checkbox-checked-color;
96
- border-bottom-color: $checkbox-checked-color;
87
+ border-right-color: v.$checkbox-checked-color;
88
+ border-bottom-color: v.$checkbox-checked-color;
97
89
 
98
- @if $use-checkbox-animation {
99
- box-shadow: 1px 1px 2px $checkbox-checked-bgcolor;
90
+ @if v.$use-checkbox-animation {
91
+ box-shadow: 1px 1px 2px v.$checkbox-checked-bgcolor;
100
92
  }
101
93
  }
102
94
  &::after {
103
- background-color: $checkbox-checked-bgcolor;
104
- border-color: $checkbox-checked-border-color;
95
+ background-color: v.$checkbox-checked-bgcolor;
96
+ border-color: v.$checkbox-checked-border-color;
105
97
  }
106
98
  }
107
- &:focus + label::after { @extend %inputFocus; }
99
+ &:focus + label::after { @include m.inputFocus; }
108
100
 
109
- @include checkbox-size($checkbox-size);
101
+ @include checkbox-size(v.$checkbox-size);
110
102
 
111
- @if isMap($checkbox-sizes) {
112
- @each $size_name, $size_value in $checkbox-sizes {
113
- &[#{$loop-component-prefix}-form~="#{$size_name}"] { @include checkbox-size($size_value) }
103
+ @if fn.isMap(v.$checkbox-sizes) {
104
+ @each $size_name, $size_value in v.$checkbox-sizes {
105
+ &[#{v.$loop-component-prefix}-form~="#{$size_name}"] { @include checkbox-size($size_value) }
114
106
  }
115
107
 
116
- @if isNotEmpty($checkbox-breakpoints-classes) {
117
- @each $breakpoint in $checkbox-breakpoints-classes {
118
- @include breakpoint($breakpoint) {
119
- @each $size_name, $size_value in $checkbox-sizes {
108
+ @if fn.isNotEmpty(v.$checkbox-breakpoints-classes) {
109
+ @each $breakpoint in v.$checkbox-breakpoints-classes {
110
+ @include breakpoint.from($breakpoint) {
111
+ @each $size_name, $size_value in v.$checkbox-sizes {
120
112
  $suffix: \@#{$breakpoint};
121
- &[#{$loop-component-prefix}-form~="#{$size_name}#{$suffix}"] { @include checkbox-size($size_value) }
113
+ &[#{v.$loop-component-prefix}-form~="#{$size_name}#{$suffix}"] { @include checkbox-size($size_value) }
122
114
  }
123
115
  }
124
116
  }
125
117
  }
126
118
  }
127
119
 
128
- @include loop($border-colors, 'border-color', '&[class*="border', true, '"] + label::after');
129
- @include loopMapKeys($border-colors-classes, $colors, 'border-color', '&[class*="border', true, '"] + label::after');
120
+ @include loop.loop(v.$border-colors, 'border-color', '&[class*="border', true, '"] + label::after');
121
+ @include loop.loopMapKeys(v.$border-colors-classes, v.$colors, 'border-color', '&[class*="border', true, '"] + label::after');
130
122
  }
@@ -1,84 +1,22 @@
1
- /**
2
- * Input
3
- */
1
+ @use '../../variables' as v;
2
+ @use '../../functions' as fn;
3
+ @use 'mixin' as m;
4
4
 
5
- $input-color: #4d4d4d !default;
6
- $input-bgcolor: #fff !default;
7
- $input-font-family: $font-family-base !default;
8
- $input-font-size: $font-size-base !default;
9
- $input-font-style: normal !default;
10
- $input-line-height: 1.15 !default;
11
- $input-height: 2.5em !default;
12
-
13
- $input-padding: .5em .625em !default; // relative to the size of the input
14
- $input-padding-sizes: () !default;
15
-
16
- $input-border-color: #d6d6d6 !default;
17
- $input-border: 1px solid $input-border-color !default;
18
- $input-border-radius: .2em !default; // relative to the size of the input
19
- $input-box-shadow: 1px 1px 1px 0 rgba(#aaa, .50) !default;
20
- $input-focus-box-shadow: 1px 1px 2px 0px rgba(#aaa, .85) !default;
21
- $input-focus-border-color: $input-border-color !default;
22
-
23
- $label-font-weight: 500 !default;
24
- $label-margin: .3rem !default;
25
-
26
- %inputFocus {
27
- @if $input-box-shadow == none and $input-focus-box-shadow != none {
28
- box-shadow: $input-focus-box-shadow;
29
- } @else if $input-focus-box-shadow != none {
30
- box-shadow: $input-box-shadow, $input-focus-box-shadow;
31
- }
32
-
33
- @if $input-border-color != $input-focus-border-color {
34
- border-color: $input-focus-border-color;
35
- }
36
- }
37
-
38
- %input,
39
- [#{$loop-component-prefix}-form~="input"] {
40
- padding: $input-padding;
41
-
42
- display: block;
43
- width: 100%;
44
- max-width: 100%;
45
- min-height: $input-height;
46
-
47
- color: $input-color;
48
- font-family: $input-font-family;
49
- font-size: $input-font-size;
50
- font-style: $input-font-style;
51
- line-height: $input-line-height;
52
-
53
- border: $input-border;
54
- border-radius: $input-border-radius;
55
- background-color: $input-bgcolor;
56
-
57
- @if $input-box-shadow != none {
58
- box-shadow: $input-box-shadow;
59
- }
60
-
61
- -webkit-appearance: none;
62
- -moz-appearance: none;
63
- appearance: none;
64
-
65
- &:focus {
66
- outline:none;
67
- @extend %inputFocus;
68
- }
5
+ [#{v.$loop-component-prefix}-form~="input"] {
6
+ @include m.input;
69
7
  }
70
8
 
71
9
  label {
72
- font-weight: $label-font-weight;
73
- + [#{$loop-component-prefix}-form~="input"],
74
- + [#{$loop-component-prefix}-form~="select"] {
75
- margin-top: $label-margin;
10
+ font-weight: v.$label-font-weight;
11
+ + [#{v.$loop-component-prefix}-form~="input"],
12
+ + [#{v.$loop-component-prefix}-form~="select"] {
13
+ margin-top: v.$label-margin;
76
14
  }
77
15
  }
78
16
 
79
- @if isNotEmpty($input-padding-sizes) {
80
- @each $name, $padding in $input-padding-sizes {
81
- [#{$loop-component-prefix}-form~="input"][#{$loop-component-prefix}-form~="#{$name}"] {
17
+ @if fn.isNotEmpty(v.$input-padding-sizes) {
18
+ @each $name, $padding in v.$input-padding-sizes {
19
+ [#{v.$loop-component-prefix}-form~="input"][#{v.$loop-component-prefix}-form~="#{$name}"] {
82
20
  padding: #{$padding};
83
21
  }
84
22
  }
@@ -0,0 +1,47 @@
1
+ @use '../../variables' as v;
2
+
3
+ @mixin inputFocus {
4
+ @if v.$input-box-shadow ==none and v.$input-focus-box-shadow !=none {
5
+ box-shadow: v.$input-focus-box-shadow;
6
+ }
7
+
8
+ @else if v.$input-focus-box-shadow !=none {
9
+ box-shadow: v.$input-box-shadow, v.$input-focus-box-shadow;
10
+ }
11
+
12
+ @if v.$input-border-color !=v.$input-focus-border-color {
13
+ border-color: v.$input-focus-border-color;
14
+ }
15
+ }
16
+
17
+ @mixin input {
18
+ padding: v.$input-padding;
19
+
20
+ display: block;
21
+ width: 100%;
22
+ max-width: 100%;
23
+ min-height: v.$input-height;
24
+
25
+ color: v.$input-color;
26
+ font-family: v.$input-font-family;
27
+ font-size: v.$input-font-size;
28
+ font-style: v.$input-font-style;
29
+ line-height: v.$input-line-height;
30
+
31
+ border: v.$input-border;
32
+ border-radius: v.$input-border-radius;
33
+ background-color: v.$input-bgcolor;
34
+
35
+ @if v.$input-box-shadow !=none {
36
+ box-shadow: v.$input-box-shadow;
37
+ }
38
+
39
+ -webkit-appearance: none;
40
+ -moz-appearance: none;
41
+ appearance: none;
42
+
43
+ &:focus {
44
+ outline: none;
45
+ @include inputFocus;
46
+ }
47
+ }
@@ -1,27 +1,20 @@
1
1
  @use 'sass:math';
2
+ @use '../../mixins/breakpoint';
3
+ @use '../../mixins/loop';
4
+ @use '../../variables' as v;
5
+ @use '../../functions' as fn;
6
+ @use 'mixin' as m;
2
7
 
3
8
  /**
4
9
  * Radio
5
10
  */
6
11
 
7
- $radio-size: $checkbox-size !default;
8
- $radio-bgcolor: $checkbox-bgcolor !default;
9
- $radio-border-color: $checkbox-border-color !default;
10
- $radio-box-shadow: $checkbox-box-shadow !default;
11
- $radio-checked-color: $input-color !default;
12
- $radio-checked-bgcolor: $radio-bgcolor !default;
13
- $radio-checked-border-color: $radio-border-color !default;
14
-
15
- $use-radio-animation: $use-checkbox-animation !default;
16
- $radio-sizes: $checkbox-sizes !default;
17
- $radio-breakpoints-classes: $checkbox-breakpoints-classes !default;
18
-
19
12
  @mixin radio-size($size) {
20
13
  & + label {
21
14
  &::after {
22
15
  margin-right: math.div($size, 3);
23
16
  }
24
- & + [#{$loop-component-prefix}-form~="radio"] + label { margin-top: math.div($size, 3); }
17
+ & + [#{v.$loop-component-prefix}-form~="radio"] + label { margin-top: math.div($size, 3); }
25
18
  }
26
19
 
27
20
  & + label::after,
@@ -31,7 +24,7 @@ $radio-breakpoints-classes: $checkbox-breakpoints-classes !default;
31
24
  }
32
25
  }
33
26
 
34
- [#{$loop-component-prefix}-form~="radio"] {
27
+ [#{v.$loop-component-prefix}-form~="radio"] {
35
28
  position: absolute;
36
29
  opacity: 0;
37
30
 
@@ -41,7 +34,7 @@ $radio-breakpoints-classes: $checkbox-breakpoints-classes !default;
41
34
  align-items: center;
42
35
  width: fit-content;
43
36
  line-height: 1.1;
44
- font-weight: $font-weight-base;
37
+ font-weight: v.$font-weight-base;
45
38
 
46
39
  &::before {
47
40
  position: absolute;
@@ -49,7 +42,7 @@ $radio-breakpoints-classes: $checkbox-breakpoints-classes !default;
49
42
  left: 0;
50
43
  content: '';
51
44
  border-radius: 50%;
52
- @if $use-radio-animation {
45
+ @if v.$use-radio-animation {
53
46
  transform: scale(1.5);
54
47
  transition: transform 300ms ease-in-out, background-color 300ms ease-in-out;
55
48
  }
@@ -58,45 +51,45 @@ $radio-breakpoints-classes: $checkbox-breakpoints-classes !default;
58
51
  display: flex;
59
52
  order:-1;
60
53
  content:'';
61
- border: 1px solid $radio-border-color;
54
+ border: 1px solid v.$radio-border-color;
62
55
  border-radius: 50%;
63
- background-color: $radio-bgcolor;
64
- box-shadow: $radio-box-shadow;
56
+ background-color: v.$radio-bgcolor;
57
+ box-shadow: v.$radio-box-shadow;
65
58
  }
66
59
  }
67
60
 
68
61
  &:checked + label {
69
62
  &::before {
70
- background-color: $radio-checked-color;
63
+ background-color: v.$radio-checked-color;
71
64
  transform: scale(0.5);
72
65
  }
73
66
  &::after {
74
- background-color: $radio-checked-bgcolor;
75
- border-color: $radio-checked-border-color;
67
+ background-color: v.$radio-checked-bgcolor;
68
+ border-color: v.$radio-checked-border-color;
76
69
  }
77
70
  }
78
71
 
79
- &:focus + label::after { @extend %inputFocus; }
72
+ &:focus + label::after { @include m.inputFocus; }
80
73
 
81
- @include radio-size($radio-size);
74
+ @include radio-size(v.$radio-size);
82
75
 
83
- @if isMap($radio-sizes) {
84
- @each $size_name, $size_value in $radio-sizes {
85
- &[#{$loop-component-prefix}-form~="#{$size_name}"] { @include radio-size($size_value) }
76
+ @if fn.isMap(v.$radio-sizes) {
77
+ @each $size_name, $size_value in v.$radio-sizes {
78
+ &[#{v.$loop-component-prefix}-form~="#{$size_name}"] { @include radio-size($size_value) }
86
79
  }
87
80
 
88
- @if isNotEmpty($radio-breakpoints-classes) {
89
- @each $breakpoint in $radio-breakpoints-classes {
90
- @include breakpoint($breakpoint) {
91
- @each $size_name, $size_value in $radio-sizes {
81
+ @if fn.isNotEmpty(v.$radio-breakpoints-classes) {
82
+ @each $breakpoint in v.$radio-breakpoints-classes {
83
+ @include breakpoint.from($breakpoint) {
84
+ @each $size_name, $size_value in v.$radio-sizes {
92
85
  $suffix: \@#{$breakpoint};
93
- &[#{$loop-component-prefix}-form~="#{$size_name}#{$suffix}"] { @include radio-size($size_value) }
86
+ &[#{v.$loop-component-prefix}-form~="#{$size_name}#{$suffix}"] { @include radio-size($size_value) }
94
87
  }
95
88
  }
96
89
  }
97
90
  }
98
91
  }
99
92
 
100
- @include loop($border-colors, 'border-color', '&[class*="border', true, '"] + label::after');
101
- @include loopMapKeys($border-colors-classes, $colors, 'border-color', '&[class*="border', true, '"] + label::after');
93
+ @include loop.loop(v.$border-colors, 'border-color', '&[class*="border', true, '"] + label::after');
94
+ @include loop.loopMapKeys(v.$border-colors-classes, v.$colors, 'border-color', '&[class*="border', true, '"] + label::after');
102
95
  }