@symbo.ls/input 2.11.477 → 2.11.488

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/Checkbox.js CHANGED
@@ -12,36 +12,30 @@ export const Checkbox = {
12
12
  },
13
13
 
14
14
  Input: {
15
- props: {
16
- type: 'checkbox',
17
- display: 'none',
18
- ':checked + div': { theme: 'primary' },
19
- ':checked + div > svg': {
20
- transform: 'none',
21
- opacity: '1'
22
- }
15
+ type: 'checkbox',
16
+ display: 'none',
17
+ ':checked + div': { theme: 'primary' },
18
+ ':checked + div > svg': {
19
+ transform: 'none',
20
+ opacity: '1'
23
21
  },
24
22
  attr: {
25
- checked: ({ parent }) => parent.props.checked
23
+ checked: (el) => el.call('exec', el.parent.props.checked)
26
24
  }
27
25
  },
28
26
 
29
27
  Flex: {
30
- props: {
31
- align: 'center center',
32
- fontSize: 'B1',
33
- padding: 'V',
34
- theme: 'field',
35
- round: 'X2',
36
- transition: 'background A defaultBezier'
37
- },
28
+ align: 'center center',
29
+ fontSize: 'B1',
30
+ padding: 'V',
31
+ theme: 'field',
32
+ round: 'X2',
33
+ transition: 'background A defaultBezier',
38
34
  Icon: {
39
- props: {
40
- icon: 'check',
41
- opacity: '0',
42
- transform: 'scale(0.9) rotate(-15deg)',
43
- transition: 'opacity B defaultBezier'
44
- }
35
+ icon: 'check',
36
+ opacity: '0',
37
+ transform: 'scale(0.9) rotate(-15deg)',
38
+ transition: 'opacity B defaultBezier'
45
39
  }
46
40
  }
47
41
  }
package/Input.js CHANGED
@@ -1,14 +1,10 @@
1
1
  'use strict'
2
2
 
3
- import { isString, replaceLiteralsWithObjectFields } from '@domql/utils'
4
-
5
3
  export const Input = {
6
4
  extend: ['Focusable'],
7
5
 
8
6
  tag: 'input',
9
7
 
10
- deps: { isString, replaceLiteralsWithObjectFields },
11
-
12
8
  props: {
13
9
  border: 'none',
14
10
  type: 'input',
@@ -27,11 +23,9 @@ export const Input = {
27
23
  autocomplete: ({ props }) => props.autocomplete,
28
24
  placeholder: ({ props }) => props.placeholder,
29
25
  value: (el, s) => {
30
- const { props, state, deps } = el
31
- const { isString, exec, replaceLiteralsWithObjectFields } = deps
32
- const val = exec(props.value, el)
33
- if (isString(val) && val.includes('{{')) {
34
- return replaceLiteralsWithObjectFields(val, state)
26
+ const val = el.call('exec', el.props.value, el)
27
+ if (el.call('isString', val) && val.includes('{{')) {
28
+ return el.call('replaceLiteralsWithObjectFields', val, s)
35
29
  }
36
30
  return val
37
31
  },
package/NumberInput.js CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict'
2
2
 
3
- import { Input } from './Input'
4
-
5
3
  export const NumberInput = {
6
- extend: ['Flex', Input],
4
+ extend: ['Flex', 'Input'],
7
5
 
8
6
  props: {
9
7
  type: 'number',
package/Radio.js CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict'
2
2
 
3
- import { Checkbox, CheckboxHgroup } from './Checkbox'
4
-
5
3
  export const Radio = {
6
- extend: Checkbox,
4
+ extend: 'Checkbox',
7
5
 
8
6
  Input: {
9
7
  type: 'radio',
@@ -11,26 +9,23 @@ export const Radio = {
11
9
  },
12
10
 
13
11
  Flex: {
14
- extend: 'Pseudo',
15
- props: {
12
+ round: '100%',
13
+ padding: 'Y',
14
+ ':after': {
15
+ content: '""',
16
+ display: 'block',
17
+ boxSize: 'X+W1',
16
18
  round: '100%',
17
- padding: 'Y',
18
- ':after': {
19
- content: '""',
20
- display: 'block',
21
- boxSize: 'X+W1',
22
- round: '100%',
23
- background: 'white',
24
- opacity: '0',
25
- transition: 'opacity .15s ease-in-out'
26
- }
19
+ background: 'white',
20
+ opacity: '0',
21
+ transition: 'opacity .15s ease-in-out'
27
22
  },
28
23
  Icon: null
29
24
  }
30
25
  }
31
26
 
32
27
  export const RadioHgroup = {
33
- extend: CheckboxHgroup,
28
+ extend: 'CheckboxHgroup',
34
29
  Checkbox: null,
35
30
  Radio: {}
36
31
  }
package/Textarea.js CHANGED
@@ -1,11 +1,8 @@
1
1
  'use strict'
2
2
 
3
- import { Flex } from '@symbo.ls/atoms'
4
- import { Input } from './Input'
5
-
6
3
  export const Textarea = {
7
4
  tag: 'textarea',
8
- extend: [Input, Flex],
5
+ extend: ['Input', 'Flex'],
9
6
 
10
7
  props: {
11
8
  variant: 'outlined',
@@ -57,9 +54,7 @@ export const TextareaWithButton = {
57
54
  minHeight: 'fit-content'
58
55
  },
59
56
  SquareButton: {
60
- props: {
61
- background: 'blue',
62
- Icon: { name: 'send' }
63
- }
57
+ background: 'blue',
58
+ Icon: { name: 'send' }
64
59
  }
65
60
  }
package/Toggle.js CHANGED
@@ -1,42 +1,36 @@
1
1
  'use strict'
2
2
 
3
- import { Checkbox, CheckboxHgroup } from './Checkbox'
4
-
5
3
  export const Toggle = {
6
- extend: Checkbox,
4
+ extend: 'Checkbox',
7
5
 
8
6
  Input: {
9
- props: {
10
- ':checked + div': {
11
- background: 'green2 +8',
12
- justifyContent: 'flex-end'
13
- }
7
+ ':checked + div': {
8
+ background: 'green2 +8',
9
+ justifyContent: 'flex-end'
14
10
  }
15
11
  },
16
12
 
17
13
  Flex: {
18
- props: {
19
- boxSize: 'A1 B1',
20
- padding: '- W_default',
21
- round: 'D',
22
- align: 'center flex-start',
23
- theme: 'field',
24
- border: 'none',
25
- transition: 'opacity .15s ease',
26
- ':after': {
27
- content: '""',
28
- boxSize: 'A A',
29
- round: '100%',
30
- background: 'white',
31
- boxShadow: '1px, 1px, Z, gray .2'
32
- }
14
+ boxSize: 'A1 B1',
15
+ padding: '- W_default',
16
+ round: 'D',
17
+ align: 'center flex-start',
18
+ theme: 'field',
19
+ border: 'none',
20
+ transition: 'opacity .15s ease',
21
+ ':after': {
22
+ content: '""',
23
+ boxSize: 'A A',
24
+ round: '100%',
25
+ background: 'white',
26
+ boxShadow: '1px, 1px, Z, gray .2'
33
27
  },
34
28
  Icon: null
35
29
  }
36
30
  }
37
31
 
38
32
  export const ToggleHgroup = {
39
- extend: CheckboxHgroup,
33
+ extend: 'CheckboxHgroup',
40
34
  Checkbox: null,
41
35
  Toggle: {}
42
36
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@symbo.ls/input",
3
- "version": "2.11.477",
3
+ "version": "2.11.488",
4
4
  "main": "index.js",
5
5
  "source": "index.js",
6
6
  "license": "MIT",
7
- "gitHead": "47546f8e3e61900fb07e92c3faf7abf2bce919ae",
7
+ "gitHead": "d84f52f7f995d7c2d04002baa9dc263a67cca0d5",
8
8
  "dependencies": {
9
9
  "@domql/utils": "^2.5.0",
10
- "@symbo.ls/atoms": "^2.11.477"
10
+ "@symbo.ls/atoms": "^2.11.480"
11
11
  }
12
12
  }