@symbo.ls/icon 2.11.480 → 2.11.491

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/index.js +6 -9
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict'
2
2
 
3
- import { isString, exec, replaceLiteralsWithObjectFields } from '@domql/utils'
4
-
5
3
  const inheritFromIsActive = (el) => {
6
4
  const { props } = el
7
5
  const propsActive = props['.isActive']
@@ -12,8 +10,8 @@ const getIconName = (el, s) => {
12
10
  const { key, props } = el
13
11
  let icon = el.call('exec', props.name || props.icon || key, el)
14
12
 
15
- if (isString(icon) && icon.includes('{{')) {
16
- icon = el.call('replaceLiteralsWithObjectFields', icon, s)
13
+ if (el.call('isString', icon) && icon.includes('{{')) {
14
+ icon = el.call('replaceLiteralsWithObjectFields', icon)
17
15
  }
18
16
 
19
17
  return el.call('isString', icon) ? icon : key
@@ -21,9 +19,8 @@ const getIconName = (el, s) => {
21
19
 
22
20
  export const Icon = {
23
21
  extend: 'Svg',
24
- deps: { isString, replaceLiteralsWithObjectFields },
25
22
  props: (el, s, ctx) => {
26
- const { props, parent, deps } = el
23
+ const { props, parent } = el
27
24
  const { ICONS, useIconSprite, verbose } = ctx && ctx.designSystem
28
25
  const { toCamelCase } = ctx && ctx.utils
29
26
 
@@ -44,13 +41,13 @@ export const Icon = {
44
41
  parentPropsActive &&
45
42
  parentPropsActive.icon
46
43
  ) {
47
- activeIconName = exec(
44
+ activeIconName = el.call('exec',
48
45
  parentPropsActive.icon || parentPropsActive.Icon.name || parentPropsActive.Icon.icon, el
49
46
  )
50
47
  }
51
48
 
52
- if (isString(activeIconName) && activeIconName.includes('{{')) {
53
- activeIconName = deps.replaceLiteralsWithObjectFields(activeIconName, s)
49
+ if (el.call('isString', activeIconName) && activeIconName.includes('{{')) {
50
+ activeIconName = el.call('replaceLiteralsWithObjectFields', activeIconName)
54
51
  }
55
52
 
56
53
  let iconInContext
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@symbo.ls/icon",
3
- "version": "2.11.480",
3
+ "version": "2.11.491",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "14db2b8d241d45fa80f588a2e0a6c50f5dbd8bee",
6
+ "gitHead": "ddd06b2b342480b2e20c02df04f9856d4ddf7060",
7
7
  "dependencies": {
8
- "@symbo.ls/atoms": "^2.11.480",
8
+ "@symbo.ls/atoms": "^2.11.491",
9
9
  "@symbo.ls/utils": "^2.11.475"
10
10
  },
11
11
  "source": "src/index.js"