lumina-sass 2.1.1 → 2.1.3
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 +1 -1
- package/src/map/_icons.sass +14 -14
- package/src/mix/_generators.sass +36 -24
package/package.json
CHANGED
package/src/map/_icons.sass
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
@use '../color/_index' as color
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
$academic: ('school': (icon: "\F62F"), 'diploma': (icon: "\F153"))
|
|
4
|
-
$
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$datetime-pickers: (
|
|
9
|
-
$input-controls: ('tel': (icon: '\F5BB'), 'url': (icon: '\F882'), 'text': (icon: '\F435'), 'search': (icon: '\F52A'), 'number': (icon: '
|
|
10
|
-
$misc-icons: ('dir': (icon: "\F3D7"), '
|
|
11
|
-
$
|
|
12
|
-
$communication: ('mail': (icon: "\F32F"), 'github': (icon: "\F3ED"), 'ytube': (icon: "\F62B"), 'facebook': (icon: "\F344"), 'linkedin': (icon: "\F472"), 'instagram': (icon: "\F437"), 'twitter': (icon: "\F5EF"))
|
|
5
|
+
$utility-inputs: ('color': (icon: '\F4B0'), 'hidden': (icon: '\F0E7'))
|
|
6
|
+
$boolean-controls: ('radio': (icon: '\F110'), 'checkbox': (icon: '\F272'))
|
|
7
|
+
$video-controls: ('play-video': (icon: '\F4F4'), 'pause-video': (icon: '\F4C4'))
|
|
8
|
+
$documents: ('pdf': (icon: "\F63D"), 'dir': (icon: "\F3D7"), 'default': (icon: "\F369"))
|
|
9
|
+
$datetime-pickers: ( 'time': (icon: '\F3E5'), 'week': (icon: '\F1E6'), 'month': (icon: '\F1E7'), 'calendar': (icon: "\F1E7") )
|
|
10
|
+
$input-controls: ('tel': (icon: '\F5BB'), 'url': (icon: '\F882'), 'text': (icon: '\F435'), 'search': (icon: '\F52A'), 'number': (icon: '\F67F'), 'password': (icon: '\F44E'))
|
|
11
|
+
$misc-icons: ('dir': (icon: "\F3D7"), 'map-pin': (icon: "\F64B"), 'collaborator': (icon: "\F4D0"), 'alarm': (icon: "\F102"), 'cloud': (icon: "\F2C1"), 'dot': (icon: "\F309"), 'code': (icon: "\\F2C8"), 'default': (icon: "\F82E"))
|
|
12
|
+
$communication: ('email': (icon: "\F84B"), 'mail': (icon: "\F32F"), 'github': (icon: "\F3ED"), 'ytube': (icon: "\F62B"), 'facebook': (icon: "\F344"), 'linkedin': (icon: "\F472"), 'instagram': (icon: "\\F437"), 'twitter': (icon: "\F5EF"))
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
$icons: (
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
|
|
16
|
+
'academic': $academic, 'document': $documents, 'misc-icons': $misc-icons,
|
|
17
|
+
'communication': $communication, 'utility-inputs': $utility-inputs,
|
|
18
|
+
'input-controls': $input-controls, 'video-controls': $video-controls,
|
|
19
|
+
'boolean-controls': $boolean-controls, 'datetime-pickers': $datetime-pickers,
|
|
20
|
+
)
|
package/src/mix/_generators.sass
CHANGED
|
@@ -1,35 +1,49 @@
|
|
|
1
1
|
@use 'sass:map' as map
|
|
2
|
+
@use "sass:list" as list
|
|
3
|
+
@use '../color/base' as base
|
|
4
|
+
@use '../map/inputs' as inputs
|
|
2
5
|
@use '../map/icons' as icon-map
|
|
3
6
|
@use '../map/tag-theme' as tag-map
|
|
4
7
|
@use '../map/flexbox' as flexbox-mapping
|
|
5
|
-
@use '../map/inputs' as inputs
|
|
6
|
-
@use "sass:list" as list
|
|
7
8
|
|
|
8
|
-
@
|
|
9
|
+
@function _icon-find($name)
|
|
10
|
+
@each $category, $maps in icon-map.$icons
|
|
11
|
+
@if map.has-key($maps, $name)
|
|
12
|
+
@return map.get($maps, $name)
|
|
13
|
+
@return null
|
|
14
|
+
|
|
15
|
+
@mixin _icon-base($name, $color, $font-family)
|
|
16
|
+
$props: _icon-find($name)
|
|
17
|
+
@if $props
|
|
18
|
+
.#{$name}
|
|
19
|
+
&::before
|
|
20
|
+
content: map.get($props, icon)
|
|
21
|
+
@if $color
|
|
22
|
+
color: $color !important
|
|
23
|
+
|
|
24
|
+
font-family: $font-family
|
|
25
|
+
@else
|
|
26
|
+
@warn "Icon #{$name} not found in icon mapping."
|
|
27
|
+
|
|
28
|
+
@mixin icon-generator($name: null, $color: rgb(64, 64, 64), $font-family: 'bootstrap-icons')
|
|
9
29
|
@if icon-map.$icons
|
|
10
30
|
@if $name == null
|
|
11
31
|
@each $category, $maps in icon-map.$icons
|
|
12
32
|
@each $icon, $props in $maps
|
|
13
33
|
.#{$icon}
|
|
14
|
-
font-family: $font-family
|
|
15
34
|
&::before
|
|
16
35
|
content: map.get($props, icon)
|
|
17
36
|
@if $color
|
|
18
|
-
color: $color
|
|
19
|
-
|
|
20
|
-
$found: false
|
|
21
|
-
@each $category, $maps in icon-map.$icons
|
|
22
|
-
@if map.has-key($maps, $name)
|
|
23
|
-
$found: true
|
|
24
|
-
$props: map.get($maps, $name)
|
|
25
|
-
.#{$name}
|
|
37
|
+
color: $color !important
|
|
38
|
+
|
|
26
39
|
font-family: $font-family
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
@else
|
|
41
|
+
$names: $name
|
|
42
|
+
@if type-of($name) != 'list'
|
|
43
|
+
$names: ($name)
|
|
44
|
+
|
|
45
|
+
@each $single in $names
|
|
46
|
+
@include _icon-base($single, $color, $font-family)
|
|
33
47
|
@else
|
|
34
48
|
@error "Icon mapping not found."
|
|
35
49
|
|
|
@@ -56,28 +70,26 @@
|
|
|
56
70
|
@if $placeholder-color != null
|
|
57
71
|
&::placeholder
|
|
58
72
|
color: $placeholder-color
|
|
59
|
-
|
|
73
|
+
&::focus
|
|
60
74
|
outline: $focus-outline
|
|
61
75
|
@else
|
|
62
76
|
$category: null
|
|
63
77
|
@each $cat, $list in inputs.$inputs
|
|
64
78
|
@if list.index($list, $name)
|
|
65
79
|
$category: $cat
|
|
66
|
-
|
|
80
|
+
|
|
67
81
|
@if $category == null
|
|
68
82
|
@warn "Input '#{$name}' not found in inputs map. Check inputs/_inputs.sass for valid names."
|
|
69
|
-
|
|
83
|
+
|
|
70
84
|
input[type="#{$name}"]
|
|
71
85
|
@each $prop, $val in $props
|
|
72
86
|
#{$prop}: $val
|
|
73
87
|
@if $placeholder-color != null
|
|
74
88
|
&::placeholder
|
|
75
89
|
color: $placeholder-color
|
|
76
|
-
|
|
77
|
-
&:focus
|
|
90
|
+
&::focus
|
|
78
91
|
outline: $focus-outline
|
|
79
92
|
|
|
80
|
-
|
|
81
93
|
// Range track styling
|
|
82
94
|
&::-webkit-slider-runnable-track
|
|
83
95
|
height: 0.4rem
|