smbls 0.15.29 → 0.15.31

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
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "0.15.29",
6
+ "version": "0.15.31",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
package/src/Icon.js CHANGED
@@ -9,20 +9,24 @@ export const Icon = {
9
9
  const { ICONS } = context && context.SYSTEM
10
10
  const iconName = props.inheritedString || props.name || props.icon || key
11
11
  const camelCase = toCamelCase(iconName)
12
- const isArray = camelCase.split(/([a-z])([A-Z])/g)
13
12
 
14
- const iconFromLibrary = ICONS[camelCase] || (ICONS[isArray[0] + isArray[1]]) || ICONS[isArray[0]] || ICONS['noIcon']
13
+ const isArray = camelCase.split(/([a-z])([A-Z])/g)
15
14
 
16
15
  let activeIconName
17
16
  if (props.active) {
18
17
  activeIconName = props['.active'].name || props['.active'].icon
19
18
  }
19
+ if (parent.props.active && parent.props['.active'] && parent.props['.active'].icon) {
20
+ activeIconName = parent.props['.active'].icon.name || parent.props['.active'].icon.icon || parent.props['.active'].icon
21
+ }
22
+
23
+ const iconFromLibrary = ICONS[activeIconName] || ICONS[camelCase] || (ICONS[isArray[0] + isArray[1]]) || ICONS[isArray[0]] || ICONS['noIcon']
20
24
 
21
25
  return {
22
26
  width: 'A',
23
27
  height: 'A',
24
28
  display: 'inline-block',
25
- src: activeIconName || iconFromLibrary,
29
+ src: iconFromLibrary,
26
30
  style: { fill: 'currentColor' }
27
31
  }
28
32
  },
@@ -10,7 +10,7 @@ export const Interaction = {
10
10
 
11
11
  export const Hoverable = {
12
12
  props: {
13
- transition: 'B',
13
+ transition: 'B default-bezier',
14
14
  transitionProperty: 'opacity, transform',
15
15
  opacity: 0.85,
16
16