lumina-sass 1.7.0 → 1.7.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumina-sass",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Lumina Sass design tokens and mixins",
5
5
  "main": "src/_index.sass",
6
6
  "sass": "src/_index.sass",
@@ -33,7 +33,7 @@
33
33
  "scripts": {
34
34
  "serve": "http-server demo",
35
35
  "release": "standard-version",
36
- "start": "npm run build && npm run serve",
36
+ "dev": "npm run build && npm run serve",
37
37
  "build": "sass demo/style.sass demo/style.css",
38
38
  "test": "echo \"Error: no test specified\" && exit 1"
39
39
  },
@@ -5,4 +5,5 @@
5
5
  @forward 'stacks'
6
6
  @forward 'accents'
7
7
  @forward 'neutral'
8
- @forward 'palette/groovy-70s'
8
+ @forward 'palette/groovy-70s'
9
+ @forward 'alerts'
@@ -3,16 +3,32 @@
3
3
  @use '../map/flexbox' as flexbox-mapping
4
4
 
5
5
 
6
- @mixin icon-generator($color: null, $font-family: 'bootstrap-icons')
6
+ @mixin icon-generator($name: null, $color: null, $font-family: 'bootstrap-icons')
7
7
  @if icon-map.$icons
8
- @each $category, $maps in icon-map.$icons
9
- @each $icon, $props in $maps
10
- .#{$icon}
11
- font-family: $font-family
12
- &:before
13
- content: map.get($props, icon)
14
- @if $color
15
- color: $color
8
+ @if $name == null
9
+ @each $category, $maps in icon-map.$icons
10
+ @each $icon, $props in $maps
11
+ .#{$icon}
12
+ font-family: $font-family
13
+ &:before
14
+ content: map.get($props, icon)
15
+ @if $color
16
+ color: $color
17
+ @else
18
+ $found: false
19
+ @each $category, $maps in icon-map.$icons
20
+ @if map.has-key($maps, $name)
21
+ $found: true
22
+ $props: map.get($maps, $name)
23
+ .#{$name}
24
+ font-family: $font-family
25
+ &:before
26
+ content: map.get($props, icon)
27
+ @if $color
28
+ color: $color
29
+
30
+ @if not $found
31
+ @warn 'Icon "#{$name}" not found in icon mapping.'
16
32
  @else
17
33
  @error 'Icon mapping not found.'
18
34