@appartmint/mint 0.10.27 → 0.10.29

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.
@@ -5,6 +5,7 @@
5
5
  @charset 'utf-8';
6
6
 
7
7
  /// Imports
8
+ @use 'sass:math';
8
9
  @use '../util' as *;
9
10
 
10
11
  /// Card Styles
@@ -39,16 +40,17 @@
39
40
 
40
41
  &#{class(stagger)} {
41
42
  position: relative;
42
- width: calc(100% + $card-padding * 2);
43
+ width: 100%;
43
44
 
44
45
  @include break(sm) {
45
46
  flex-direction: row;
47
+ width: calc(100% + $card-padding * 2);
46
48
  border-radius: 0;
47
49
  box-shadow: none;
48
50
  overflow: visible;
49
51
 
50
- &>#{class(image)},
51
- &>mint-image #{class(image)} {
52
+ & > #{class(image)},
53
+ & > mint-image #{class(image)} {
52
54
  width: 50%;
53
55
  height: fit-content;
54
56
  margin-right: $card-padding * -2;
@@ -61,7 +63,7 @@
61
63
  }
62
64
  }
63
65
 
64
- &>#{class(content)} {
66
+ & > #{class(content)} {
65
67
  width: 50%;
66
68
  height: fit-content;
67
69
  margin-top: $card-padding * 2;
@@ -73,23 +75,23 @@
73
75
  &#{class(reverse)} {
74
76
  @include break(sm) {
75
77
  flex-direction: row-reverse;
76
- }
77
78
 
78
- &>#{class(image)},
79
- &>mint-image #{class(image)} {
80
- margin-right: $card-padding * 2;
81
- margin-left: $card-padding * -2;
79
+ & > #{class(image)},
80
+ & > mint-image #{class(image)} {
81
+ margin-right: $card-padding * 2;
82
+ margin-left: $card-padding * -2;
83
+ }
82
84
  }
83
85
  }
84
86
  }
85
87
 
86
- &>#{class(image)}:only-child,
87
- &>mint-image:only-child #{class(image)} {
88
+ & > #{class(image)}:only-child,
89
+ & > mint-image:only-child #{class(image)} {
88
90
  width: 100%;
89
91
  }
90
92
 
91
- &>#{class(image)},
92
- &>mint-image #{class(image)} {
93
+ & > #{class(image)},
94
+ & > mint-image #{class(image)} {
93
95
  overflow: hidden;
94
96
 
95
97
  @include break(sm) {
@@ -105,13 +107,14 @@
105
107
 
106
108
  #{class(content)} {
107
109
  display: grid;
108
- gap: $grid-gap / 2;
110
+ gap: math.div($grid-gap, 2);
111
+ position: relative;
109
112
  padding: $card-padding;
110
113
  background: css-var($card-bg-color);
111
114
  width: 100%;
112
115
  overflow: hidden;
113
116
 
114
- &> * {
117
+ & > * {
115
118
  margin-top: 0;
116
119
  margin-bottom: 0;
117
120
  }
@@ -133,8 +136,8 @@
133
136
  height: 100%;
134
137
  }
135
138
 
136
- &>#{class(image)},
137
- &>mint-image {
139
+ & > #{class(image)},
140
+ & > mint-image {
138
141
  width: 100%;
139
142
  height: 100%;
140
143
  max-width: $card-logo-size;
@@ -156,10 +159,10 @@
156
159
  font-size: calc($card-logo-size - 1rem);
157
160
  }
158
161
 
159
- &>div {
162
+ & > div {
160
163
  width: 100%;
161
164
 
162
- &>* {
165
+ & > * {
163
166
  margin: 0;
164
167
  }
165
168
  }
@@ -171,15 +174,15 @@
171
174
  #{class(card)} {
172
175
  flex-direction: column !important;
173
176
 
174
- &>#{class(image)},
175
- &>mint-image #{class(image)} {
177
+ & > #{class(image)},
178
+ & > mint-image #{class(image)} {
176
179
  overflow: hidden;
177
180
 
178
181
  @include break(sm) {
179
182
  width: 100%;
180
183
  }
181
184
 
182
- &+#{class(content)} {
185
+ & + #{class(content)} {
183
186
  @include break(sm) {
184
187
  width: 100%;
185
188
  }
@@ -112,7 +112,8 @@ $delay: (
112
112
  med-fast: $delay-base + $delay-step * 2,
113
113
  default: $delay-base + $delay-step * 3,
114
114
  med-slow: $delay-base + $delay-step * 4,
115
- slow: $delay-base + $delay-step * 5) !default;
115
+ slow: $delay-base + $delay-step * 5
116
+ ) !default;
116
117
 
117
118
  /// Breakpoint variables
118
119
  /// @group Maps
@@ -126,7 +127,8 @@ $break: (
126
127
  sm: 768,
127
128
  md: 1024,
128
129
  lg: 1200,
129
- xl: 1440) !default;
130
+ xl: 1440
131
+ ) !default;
130
132
 
131
133
  /// True if Bootstrap5 is used in the project
132
134
  /// @group Variables
@@ -134,11 +136,13 @@ $break: (
134
136
  $bootstrap5: false !default;
135
137
 
136
138
  @if ($bootstrap5) {
137
- $break: (sm: 576,
139
+ $break: (
140
+ sm: 576,
138
141
  md: 768,
139
142
  lg: 992,
140
143
  xl: 1200,
141
- xxl: 1400) !default;
144
+ xxl: 1400
145
+ ) !default;
142
146
  }
143
147
 
144
148
  /// Prefixes the provided string with the library name if it isn't already
@@ -150,18 +154,17 @@ $bootstrap5: false !default;
150
154
  /// @param {String} $base - the string to be prefixed
151
155
  /// @return {String} - a prefixed string
152
156
  @function prefix ($base) {
153
- @if (type-of($base) !='string') {
157
+ @if (type-of($base) != 'string') {
154
158
  @error 'The prefix function requires a string value.';
155
159
  }
156
160
 
157
- $base: string.to-lower-case($base
158
- );
161
+ $base: string.to-lower-case($base);
159
162
 
160
- @if (string.index($base, $pre) !=1) {
161
- $base: $pre +$base;
162
- }
163
+ @if (string.index($base, $pre) != 1) {
164
+ $base: #{$pre}#{$base};
165
+ }
163
166
 
164
- @return $base;
167
+ @return $base;
165
168
  }
166
169
 
167
170
  /// Prefixes the provided string with two dashes and the library name if it isn't already
@@ -173,15 +176,15 @@ $bootstrap5: false !default;
173
176
  /// @param {String} $base - the string to be prefixed
174
177
  /// @return {String} - a prefixed string
175
178
  @function css-prefix ($base) {
176
- @if (type-of($base) !='string') {
179
+ @if (type-of($base) != 'string') {
177
180
  @error 'The css-prefix function requires a string value.';
178
181
  }
179
182
 
180
- @while (string.index($base, $dash)==1) {
183
+ @while (string.index($base, $dash) == 1) {
181
184
  $base: string.slice($base, 2);
182
185
  }
183
186
 
184
- @return $dash +$dash +prefix($base);
187
+ @return #{$dash}#{$dash}#{prefix($base)};
185
188
  }
186
189
 
187
190
  /// Creates a CSS-var call for the prefixed `$base`
@@ -193,7 +196,7 @@ $bootstrap5: false !default;
193
196
  /// @param {String} $base - the CSS-var to create a call for
194
197
  /// @return {String} - a CSS-var call
195
198
  @function css-var ($base) {
196
- @if (type-of($base) !='string') {
199
+ @if (type-of($base) != 'string') {
197
200
  @error 'The css-var function requires a string value.';
198
201
  }
199
202
 
@@ -209,11 +212,11 @@ $bootstrap5: false !default;
209
212
  /// @param {String} $base - the CSS-selector to negate
210
213
  /// @return {String} - a negated CSS-selector
211
214
  @function neg ($base) {
212
- @if (type-of($base) !='string') {
215
+ @if (type-of($base) != 'string') {
213
216
  @error 'The neg function requires a string value.';
214
217
  }
215
218
 
216
- @return ':not('+$base +')';
219
+ @return ':not(#{$base})';
217
220
  }
218
221
 
219
222
  /// Creates a class selector with the library prefix
@@ -225,11 +228,11 @@ $bootstrap5: false !default;
225
228
  /// @param {String} $base - the name of the class
226
229
  /// @return {String} - a class selector
227
230
  @function class($base) {
228
- @if (type-of($base) !='string') {
231
+ @if (type-of($base) != 'string') {
229
232
  @error 'The class function requires a string value.';
230
233
  }
231
234
 
232
- @return $dot +prefix($base);
235
+ @return #{$dot}#{prefix($base)};
233
236
  }
234
237
 
235
238
  /// Creates an id selector with the library prefix
@@ -242,23 +245,23 @@ $bootstrap5: false !default;
242
245
  /// @param {String} $op - the comparison operator
243
246
  /// @return {String} - an id selector
244
247
  @function id ($base, $op: '=') {
245
- @if (type-of($base) !='string') {
248
+ @if (type-of($base) != 'string') {
246
249
  @error 'The id function requires a string value.';
247
250
  }
248
251
 
249
- @if (type-of($op) !='string') {
252
+ @if (type-of($op) != 'string') {
250
253
  @error 'The controls function requires a string value for param 2.';
251
254
  }
252
255
 
253
- @if not($op =='=' or $op =='~=' or $op =='|=' or $op =='^=' or $op =='$=' or $op =='*=') {
256
+ @if not($op == '=' or $op == '~=' or $op == '|=' or $op == '^=' or $op == '$=' or $op == '*=') {
254
257
  @error 'The controls function requires a valid attribute comparison operator for param 2.';
255
258
  }
256
259
 
257
- @if ($op =='=') {
258
- @return $hash +prefix($base);
260
+ @if ($op == '=') {
261
+ @return #{$hash}#{prefix($base)};
259
262
  }
260
263
 
261
- @return '[id'+$op +prefix($base)+']';
264
+ @return '[id#{$op}#{prefix($base)}]';
262
265
  }
263
266
 
264
267
  /// Creates an aria-controls selector with the library prefix
@@ -271,19 +274,19 @@ $bootstrap5: false !default;
271
274
  /// @param {String} $op - the comparison operator
272
275
  /// @return {String} - an aria-controls selector
273
276
  @function controls ($id, $op: '=') {
274
- @if (type-of($id) !='string') {
277
+ @if (type-of($id) != 'string') {
275
278
  @error 'The controls function requires a string value for param 1.';
276
279
  }
277
280
 
278
- @if (type-of($op) !='string') {
281
+ @if (type-of($op) != 'string') {
279
282
  @error 'The controls function requires a string value for param 2.';
280
283
  }
281
284
 
282
- @if not($op =='=' or $op =='~=' or $op =='|=' or $op =='^=' or $op =='$=' or $op =='*=') {
285
+ @if not($op == '=' or $op == '~=' or $op == '|=' or $op == '^=' or $op == '$=' or $op == '*=') {
283
286
  @error 'The controls function requires a valid attribute comparison operator for param 2.';
284
287
  }
285
288
 
286
- @return '[aria-controls'+$op +prefix($id)+']';
289
+ @return '[aria-controls#{$op}#{prefix($id)}]';
287
290
  }
288
291
 
289
292
  /// Creates an aria-expanded selector
@@ -295,19 +298,19 @@ $bootstrap5: false !default;
295
298
  /// @param {Bool} $bool - the value of the selector
296
299
  /// @return {String} - an aria-expanded selector
297
300
  @function expanded ($bool) {
298
- @if (type-of($bool)=='string') {
301
+ @if (type-of($bool) == 'string') {
299
302
  $bool: string.to-lower-case($bool);
300
303
 
301
- @if not($bool =='true' or $bool =='false') {
304
+ @if not($bool == 'true' or $bool == 'false') {
302
305
  @error 'The expanded function requires a boolean value.';
303
306
  }
304
307
  }
305
308
 
306
- @else if (type-of($bool) !='bool') {
309
+ @else if (type-of($bool) != 'bool') {
307
310
  @error 'The expanded function requires a boolean value.';
308
311
  }
309
312
 
310
- @return '[aria-expanded='+$bool +']';
313
+ @return '[aria-expanded=#{$bool}]';
311
314
  }
312
315
 
313
316
  /// Creates an aria-hidden selector
@@ -319,19 +322,19 @@ $bootstrap5: false !default;
319
322
  /// @param {Bool} $bool - the value of the selector
320
323
  /// @return {String} - an aria-hidden selector
321
324
  @function hidden ($bool) {
322
- @if (type-of($bool)=='string') {
325
+ @if (type-of($bool) == 'string') {
323
326
  $bool: string.to-lower-case($bool);
324
327
 
325
- @if not($bool =='true' or $bool =='false') {
326
- @error 'The hidden function requires a boolean value. Received: '+$bool;
328
+ @if not($bool == 'true' or $bool == 'false') {
329
+ @error 'The hidden function requires a boolean value. Received: #{$bool}';
327
330
  }
328
331
  }
329
332
 
330
333
  @else if (type-of($bool) !='bool') {
331
- @error 'The hidden function requires a boolean value. Received: '+$bool;
334
+ @error 'The hidden function requires a boolean value. Received: #{$bool}';
332
335
  }
333
336
 
334
- @return '[aria-hidden='+$bool +']';
337
+ @return '[aria-hidden=#{$bool}]';
335
338
  }
336
339
 
337
340
  /// Converts a number to ms
@@ -343,7 +346,7 @@ $bootstrap5: false !default;
343
346
  /// @param {Number} $val - the number of ms to return
344
347
  /// @return {Number} the number as ms
345
348
  @function ms ($val) {
346
- @if (type-of($val) !='number') {
349
+ @if (type-of($val) != 'number') {
347
350
  @error 'The ms function requires a number value.';
348
351
  }
349
352
 
@@ -359,7 +362,7 @@ $bootstrap5: false !default;
359
362
  /// @param {Number} $val - the number of px to return
360
363
  /// @return {Number} - the number as px
361
364
  @function px ($val) {
362
- @if (type-of($val) !='number') {
365
+ @if (type-of($val) != 'number') {
363
366
  @error 'The px function requires a number value.';
364
367
  }
365
368
 
@@ -375,7 +378,7 @@ $bootstrap5: false !default;
375
378
  /// @param {Number} $val - the value to strip
376
379
  /// @return {Number} - the number without units
377
380
  @function strip-unit($val) {
378
- @if (type-of($val) !='number') {
381
+ @if (type-of($val) != 'number') {
379
382
  @error 'The strip-unit function requires a number value.';
380
383
  }
381
384
 
@@ -394,16 +397,16 @@ $bootstrap5: false !default;
394
397
  /// @throws {Error} - if the values are not numbers
395
398
  /// @throws {Error} - if the divisor is 0
396
399
  @function percent($dividend, $divisor, $padding: 0) {
397
- @if (type-of($dividend) !='number' or type-of($divisor) !='number' or type-of($padding) !='number') {
400
+ @if (type-of($dividend) != 'number' or type-of($divisor) != 'number' or type-of($padding) != 'number') {
398
401
  @error 'The percent function requires number parameters.';
399
402
  }
400
403
 
401
- @if ($divisor ==0) {
404
+ @if ($divisor == 0) {
402
405
  @error 'The percent function requires a non-zero value for param 2.';
403
406
  }
404
407
 
405
- @if (strip-unit($padding) !=0) {
406
- @return calc((($dividend * 100%) - $padding) / $divisor)+'%';
408
+ @if (strip-unit($padding) != 0) {
409
+ @return #{calc((($dividend * 100%) - $padding) / $divisor)}#{'%'};
407
410
  }
408
411
 
409
412
  @return math.div($dividend * 100%, $divisor);
@@ -479,7 +482,7 @@ $bootstrap5: false !default;
479
482
  /// @param {String} $max - the key of the breakpoint to use with max-width
480
483
  /// @output the provided content wrapped in a media query
481
484
  @mixin break ($min, $max: null) {
482
- @if not(map-has-key($break, $min) and (type-of($max)=='null' or map-has-key($break, $max))) {
485
+ @if not(map-has-key($break, $min) and (type-of($max) == 'null' or map-has-key($break, $max))) {
483
486
  @error 'The break mixin requires one or two of the following values: #{map-keys($break)}';
484
487
  }
485
488
 
@@ -593,11 +596,11 @@ $bootstrap5: false !default;
593
596
  @error 'The fluid mixin requires a string for the $prop argument.';
594
597
  }
595
598
 
596
- @if not(type-of($u1)=='string' and type-of($u2)=='string' and type-of($u3)=='string' and type-of($u4)=='string') {
599
+ @if not(type-of($u1) == 'string' and type-of($u2) == 'string' and type-of($u3) == 'string' and type-of($u4) == 'string') {
597
600
  @error 'The fluid mixin requires numbers for the width and size arguments.';
598
601
  }
599
602
 
600
- @if not($u1 ==$u2 and $u1 ==$u3 and $u1 ==$u4) {
603
+ @if not($u1 == $u2 and $u1 == $u3 and $u1 == $u4) {
601
604
  @error 'The fluid mixin requires width and size arguments with the same units.';
602
605
  }
603
606
 
@@ -626,50 +629,50 @@ $bootstrap5: false !default;
626
629
  /// @param {Boolean} $alpha - whether to generate alpha variations
627
630
  /// @output css variables for different shades of the source color
628
631
  @mixin shades ($name, $color, $type: both, $number: 7, $amount: 10%, $alpha: false) {
629
- @if (type-of($name) !='string') {
632
+ @if (type-of($name) != 'string') {
630
633
  @error 'The shades mixin requires a string for the $name argument.';
631
634
  }
632
635
 
633
- @if (type-of($color) !='color') {
636
+ @if (type-of($color) != 'color') {
634
637
  @error 'The shades mixin requires a color for the $color argument.';
635
638
  }
636
639
 
637
- @if not($type ==lighten or $type ==darken or $type ==both) {
640
+ @if not($type == lighten or $type == darken or $type == both) {
638
641
  @error 'The shades mixin requires a string of "lighten", "darken", or "both" for the $type argument.';
639
642
  }
640
643
 
641
- @if (type-of($number) !='number') {
644
+ @if (type-of($number) != 'number') {
642
645
  @error 'The shades mixin requires a number for the $number argument.';
643
646
  }
644
647
 
645
- @if (type-of($alpha)=='string') {
648
+ @if (type-of($alpha) == 'string') {
646
649
  $bool: string.to-lower-case($bool);
647
650
 
648
- @if not($bool =='true' or $bool =='false') {
649
- @error 'The shades mixin requires a boolean value for the $alpha argument. Received: '+$bool;
651
+ @if not($bool == 'true' or $bool == 'false') {
652
+ @error 'The shades mixin requires a boolean value for the $alpha argument. Received: #{$bool}';
650
653
  }
651
654
  }
652
655
 
653
- @else if (type-of($alpha) !='bool') {
654
- @error 'The shades mixin requires a boolean value for the $alpha argument. Received: '+$bool;
656
+ @else if (type-of($alpha) != 'bool') {
657
+ @error 'The shades mixin requires a boolean value for the $alpha argument. Received: #{$bool}';
655
658
  }
656
659
 
657
660
  @include css-var(#{$name}, $color);
658
661
 
659
662
  @if ($alpha) {
660
- @if ($type ==lighten) {
663
+ @if ($type == lighten) {
661
664
  @for $i from 0 through $number - 1 {
662
665
  @include css-var(#{$name}-#{$i}, color.adjust($color, $alpha: -$i * math.div($amount, 100%)));
663
666
  }
664
667
  }
665
668
 
666
- @else if ($type ==darken) {
669
+ @else if ($type == darken) {
667
670
  @for $i from 0 through $number - 1 {
668
671
  @include css-var(#{$name}-#{$i}, color.adjust($color, $alpha: $i * math.div($amount, 100%)));
669
672
  }
670
673
  }
671
674
 
672
- @else if ($type ==both) {
675
+ @else if ($type == both) {
673
676
  $num-light: floor(math.div($number, 2));
674
677
 
675
678
  @for $i from 0 through $num-light - 1 {
@@ -678,26 +681,26 @@ $bootstrap5: false !default;
678
681
 
679
682
  @include css-var(#{$name}-#{$num-light}, $color);
680
683
 
681
- @for $i from $num-light +1 through $number - 1 {
684
+ @for $i from $num-light + 1 through $number - 1 {
682
685
  @include css-var(#{$name}-#{$i}, color.adjust($color, $alpha: ($num-light - $i) * math.div($amount, 100%)));
683
686
  }
684
687
  }
685
688
  }
686
689
 
687
690
  @else {
688
- @if ($type ==lighten) {
691
+ @if ($type == lighten) {
689
692
  @for $i from 0 through $number - 1 {
690
693
  @include css-var(#{$name}-#{$i}, lighten($color, $i * $amount));
691
694
  }
692
695
  }
693
696
 
694
- @else if ($type ==darken) {
697
+ @else if ($type == darken) {
695
698
  @for $i from 0 through $number - 1 {
696
699
  @include css-var(#{$name}-#{$i}, darken($color, $i * $amount));
697
700
  }
698
701
  }
699
702
 
700
- @else if ($type ==both) {
703
+ @else if ($type == both) {
701
704
  $num-light: floor(math.div($number, 2));
702
705
 
703
706
  @for $i from 0 through $num-light - 1 {
@@ -706,7 +709,7 @@ $bootstrap5: false !default;
706
709
 
707
710
  @include css-var(#{$name}-#{$num-light}, $color);
708
711
 
709
- @for $i from $num-light +1 through $number - 1 {
712
+ @for $i from $num-light + 1 through $number - 1 {
710
713
  @include css-var(#{$name}-#{$i}, darken($color, ($i - $num-light) * $amount));
711
714
  }
712
715
  }
@@ -716,28 +719,28 @@ $bootstrap5: false !default;
716
719
  /// TODO: Document this
717
720
  @mixin states ($states...) {
718
721
  @each $state in $states {
719
- @if (type-of($state) !='string') {
722
+ @if (type-of($state) != 'string') {
720
723
  @error 'The states mixin requires a string for each state argument.';
721
724
  }
722
725
 
723
- @if not($state =='hover' or $state =='focus' or $state =='active' or $state =='visited' or $state =='disabled') {
726
+ @if not($state == 'hover' or $state == 'focus' or $state == 'active' or $state == 'visited' or $state == 'disabled') {
724
727
  @error 'The states mixin requires a string of "hover", "focus", "active", "visited", or "disabled" for each state argument.';
725
728
  }
726
729
  }
727
730
 
728
- @if (index($states, 'hover') !=null) {
731
+ @if (index($states, 'hover') != null) {
729
732
  &:hover {
730
733
  @content;
731
734
  }
732
735
  }
733
736
 
734
- @if (index($states, 'focus') !=null) {
737
+ @if (index($states, 'focus') != null) {
735
738
  &:focus {
736
739
  @content;
737
740
  }
738
741
  }
739
742
 
740
- @if (index($states, 'active') !=null) {
743
+ @if (index($states, 'active') != null) {
741
744
 
742
745
  &:active,
743
746
  &#{class(active)} {
@@ -745,13 +748,13 @@ $bootstrap5: false !default;
745
748
  }
746
749
  }
747
750
 
748
- @if (index($states, 'visited') !=null) {
751
+ @if (index($states, 'visited') != null) {
749
752
  &:visited {
750
753
  @content;
751
754
  }
752
755
  }
753
756
 
754
- @if (index($states, 'disabled') !=null) {
757
+ @if (index($states, 'disabled') != null) {
755
758
  &:disabled {
756
759
  @content;
757
760
  }
@@ -846,7 +849,7 @@ $transitions: (
846
849
 
847
850
  & {
848
851
  @each $item in $this {
849
- @if (list.index($this, $item) !=1) {
852
+ @if (list.index($this, $item) != 1) {
850
853
  $animation: #{$animation},
851
854
  ;
852
855
  }