imba-localization 0.3.4 → 0.3.5

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 (2) hide show
  1. package/localization.imba +18 -18
  2. package/package.json +1 -1
package/localization.imba CHANGED
@@ -61,7 +61,7 @@ tag language-selector
61
61
 
62
62
  def onselect key
63
63
  #dropdown = false
64
- state.active = key
64
+ state.active = key
65
65
 
66
66
  def icon country
67
67
  return icons.replace('##',country)
@@ -74,27 +74,27 @@ tag language-selector
74
74
 
75
75
  css
76
76
  $ease: 0.5s
77
- .main rd:8px px:15px py:8px cursor:pointer bgc:light-dark(#000000/10, #FFFFFF/20) fw:500 fs:13px ead:$ease bd:1px solid transparent
78
- .main-active bgc:light-dark(#000000/20, #FFFFFF/30) bd:1px solid transparent
79
- .main-flag mr:10px rd:50% w:20px h:20px bd:1px solid transparent
80
- .main-name mr:10px bd:1px solid transparent
81
- .main-arrow w:16px h:16px fill:light-dark(#000000,#FFFFFF) ml:auto scale-y:-1 bd:1px solid transparent
82
- .main-arrow-active scale-y:1 bd:1px solid transparent
77
+ .container rd:8px px:15px py:8px cursor:pointer bgc:light-dark(#000000/10, #FFFFFF/20) fw:500 fs:13px ead:$ease bd:1px solid transparent
78
+ @.active bgc:light-dark(#000000/20, #FFFFFF/30) bd:1px solid transparent
79
+ .flag mr:10px rd:50% w:20px h:20px bd:1px solid transparent
80
+ .name mr:10px bd:1px solid transparent
81
+ .arrow w:16px h:16px fill:light-dark(#000000,#FFFFFF) ml:auto scale-y:-1 bd:1px solid transparent
82
+ @.active scale-y:1 bd:1px solid transparent
83
83
  .menu t:100% l:50% x:-50% zi:999 backdrop-filter:blur(20px) mt:2px rd:8px rd:8px py:5px bgc:light-dark(#000000/5, #FFFFFF/10) fw:500 fs:13px ead:$ease bd:1px solid transparent
84
- .menu-item d:hflex ai:center px:10px py:5px rd:8px cursor:pointer bg@hover:light-dark(#000000/10, #FFFFFF/20) m:5px bd:1px solid transparent
85
- .menu-item-icon h:20px w:20px mr:10px rd:50% bd:1px solid transparent
86
- .menu-item-text fs:13px bd:1px solid transparent
84
+ .item d:hflex ai:center px:10px py:5px rd:8px cursor:pointer bg@hover:light-dark(#000000/10, #FFFFFF/20) m:5px bd:1px solid transparent
85
+ .icon h:20px w:20px mr:10px rd:50% bd:1px solid transparent
86
+ .text fs:13px bd:1px solid transparent
87
87
 
88
- <self.language-selector [pos:rel] @mouseenter=(#dropdown = true) @mouseleave=mouseleave>
89
- <div.main [pos:rel d:hcc] .main-active=#dropdown>
90
- <img.main-flag src=icon(state[state.active].$.flag)>
91
- <div.main-name> state.$.name
92
- <svg.main-arrow [ead:$ease] .main-arrow-active=#dropdown viewBox="0 0 256 256">
88
+ <self [pos:rel] @mouseenter=(#dropdown = true) @mouseleave=mouseleave>
89
+ <div.container [pos:rel d:hcc] .active=#dropdown>
90
+ <img.flag src=icon(state[state.active].$.flag)>
91
+ <div.name> state.$.name
92
+ <svg.arrow [ead:$ease] .active=#dropdown viewBox="0 0 256 256">
93
93
  <{arrow}>
94
94
 
95
95
  if #dropdown
96
96
  <div$menu.menu [pos:abs w:100% > max-content o@off:0] ease>
97
97
  for own key, value of state.languages
98
- <div.menu-item @click=onselect(key) [d:none]=(key == state.active)>
99
- <img.menu-item-icon src=icon(value.$.flag)>
100
- <span.menu-item-text> value.$.name
98
+ <div.item @click=onselect(key) [d:none]=(key == state.active)>
99
+ <img.icon src=icon(value.$.flag)>
100
+ <span.text> value.$.name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imba-localization",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/HeapVoid/imba-localization.git"